homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

Why so many 304 response from my server?

5+ Year Member

Msg#: 3760569 posted 3:16 pm on Oct 7, 2008 (gmt 0)

I have set some resources such as JavaScript file to expire in the years of 2038, why according to my server log, there are still around 40-50% of 304 response from my server?

I suppose upoon the first request, client should not validate the file again since I have manually set to expire in 2038?



WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3760569 posted 4:55 pm on Oct 7, 2008 (gmt 0)

I'm assuming that you've used the "Live HTTP Headers" add-on for Firefox/Mozilla or an on-line server response header checking tool to check your cache-control and expiry headers, and that they are correct, marking these objects as cacheable.

But it is up to the client cache (or corporate or ISP cache) to decide when to check an object for freshness. We can only make our servers give them a 'hint' about how long an object is to be considered 'fresh.'

In some ways, you 2038 expiry date may be counter-productive, in that the client cache-control logic 'may not believe you' and think that the 2038 date is an error, and that your server is sending the 'default' last-possible date in the *nix calendar. Try setting the expiry date to a more reasonable time, such as 90 days -- This is a long time in the caching world, and the effect on your server bandwidth is likely to be negligible.

To be clear, changing your cache expiry time from 30 years to 30 or 90 days won't raise you bandwidth much, whereas changing it from three days to one hour would. The expiry-time versus bandwidth graph is a curve, with a very sharp rising slope from minutes to hours, but a very long, slowly-rising slope from days to months. The part of the curve from months to years is almost flat -- essentially showing no benefit to extremely-long expiry times.

Consider that most cache entries will be flushed to make room for newer cacheable objects, caches will be cleared, and browsers, operating systems, and computers replaced long before a 2038 expiry time is reached...


Global Options:
 top home search open messages active posts  

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved