Additional info at :
http://www.tutorialized.com/tutorial...-ASP.Net./9068
Here's sample code :
Dim dtNowUnc As DateTime = DateTime.Now().ToUniversalTime
Dim sDtModHdr = Request.Headers.Get("If-Modified-Since")
' does header contain If-Modified-Since?
If (sDtModHdr <> "") And IsDate(sDtModHdr) Then
' convert to UNC date
Dim dtModHdrUnc As DateTime = Convert.ToDateTime(sDtModHdr).ToUniversalTime
' if it was within the last 15 minutes, return 304 and exit
If DateTime.Compare(dtModHdrUnc, dtNowUnc.AddMinutes(-15)) > 0 Then
Response.StatusCode = 304
Response.End()
Exit Sub
End If
End If
' add Last-modified to header - FeedDemon stores this with cached
' feed so it's passed to the server the next time the feed is updated
Response.AddHeader("Last-modified", dtNowUnc.ToString("r"))
Picked up from :
http://nick.typepad.com/blog/2004/09...ndwidth_c.html
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
ASPNETFAQ.COM :
http://www.aspnetfaq.com/
Foros de ASP.NET en Español :
http://asp.net.do/foros/
======================================
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:uV*************@TK2MSFTNGP09.phx.gbl...
See a running sample at : http://aspnet.asp101.com/samples/modified.aspx
Pick up the code at : http://www.asp101.com/samples/modified_aspx.zip
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Roshawn Dawson" <ud****@bellsouth.net> wrote in message
news:ON****************@TK2MSFTNGP12.phx.gbl... Hi,
I've been reading the <a href="http://www.google.com/webmasters/guidelines.html">Google
WebMaster Guidelines. Google urges web developers to make use of the If-Modified-Since
http header with an emphasis on saving bandwidth and overhead.
How do I use this header in ASP.NET? Is it there by default or must I explicitly place
it in the Headers collection? How would I inform the GoogleBot of this information?
Thanks,
Roshawn