Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
If-Modified-Since HTTP Header Demonstrates how to use the if-modified-since header in VB.NET to send an HTTP request that will only return the full page if it has been modified. NOTE: This depends on the HTTP server supporting if-modified-since, and dynamic pages may never return a 304 status code. Dim http As New Chilkat.Http
http.UnlockComponent("anything for 30-day trial")
' Return the HTML page only if it's been modified since this date...
http.SetRequestHeader("If-Modified-Since", "Thu, 07 Sep 2006 17:12:50 GMT")
Dim html As String
html = http.QuickGetStr("http://www.thaibugs.com/")
If (Len(html) = 0) Then
If (http.LastStatus = 304) Then
MessageBox.Show("Has not been modified!")
Else
MessageBox.Show(http.LastStatus)
MessageBox.Show(http.LastResponseHeader)
End If
Else
MessageBox.Show(http.LastResponseHeader)
End If
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.