I do not see anywhere in your code that you actually return a 304 response.
What you probably want to do is to set the Response.Expires to a date/time slightly in the future. For example now + 30 minutes. That way the browser will keep the page cached, and will not even make a request for the page, until the page is 30 minutes old in the cache. Note that the Expires header must be a date. Setting Expires=1 does not really mean anything.
Otherwise, you must change your code to read the If-Modified-Since request header, which is the time that the browser downloaded the page last. Your code must then decide if the page has changed since that time. If the page has not changed your code should return a 304 using Response.StatusCode=304.
Main Topics
Browse All Topics





by: just1coderPosted on 2007-03-14 at 07:40:15ID: 18718739
I can get a .htm file to 304 without any trouble of course too...