>I am not sure how can I set that header any ideas about it.

Ketan,

If-Modified-Since is a header generated by the client, not your server. What you're describing is known as Conditional GET, and here's how it works:

(1) On every request, you send a Last-Modified header with your content, with the value set to a properly formatted RFC822 date. Obviously, the date you send should be the date the page's content last changed. (This means you'll need to store the date along with the content, if you're not doing that already.)

(2) On every request, call GetHttpRequestData(), and look for an If-Modified-Since header.

(3) If you do not find such a header, or the date passed in via If-Modified-Since is earlier than your current Last-Modified date, then generate your content as you normally would.

(4) If you *do* find If-Modified-Since, and it is a match for your Last-Modified, then that means the client in question has already seen what you're offering. So send back an empty page with an HTTP 302 header.

Now, technically, you should *also* be sending an ETag header and looking for If-None-Match. But if you're only interested in optimizing for Google, and they only ask for If-Modified-Since support, then you're on your way.

--
Roger Benningfield
JournURL: http://journurl.com/
blog: http://admin.suppport.journurl.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to