Closed Bug 188610 Opened 23 years ago Closed 23 years ago

Recently created content with no expiration in the response header expires almost immediately

Categories

(Core :: Networking: HTTP, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dpoch, Assigned: darin.moz)

References

()

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20030110 Pages such as yerf.com that have new content constantly being added (in this example a listing of recent images) and this new content has no expiration time makes this content expire from the cache too soon because the freshness value is based on the last-modified time of the conent. (In this case, this means an almost immediate expire time.) This means content that hasn't changed must be transferred from the web site every time the page is revisited, causing a major performance issue for the majority of the world which doesn't have high-speed internet access. Reproducible: Always Steps to Reproduce: 1. Set cache updating to "once per session". (always may work, too.) 2. Go to yerf.com/recent 3. Allow all of the image thumbnails to load. 4. Go to about:cache and note the expiration times of the most recently added images. 5. Wait until some of the expiration times you noted pass. 6. Close and reopen the browser. (Make sure you don't have your cache updating set to "never".) 6. Revisit the recent images page again. Actual Results: If you have a slow connection you'll notice the images that have expired must all be transferred again. Expected Results: Cached content with no expiration time shouldn't expire immediately and should be fetched from the cache instead of the web server. This bug is also in Mozilla 1.2.1. (In fact, it's in every release since the new caching method was applied. I suspect it didn't appear earlier because the expiration routines weren't working properly with the old cache, so this problem was simply not manifesting itself.) This bug is related to 80731, however that bug doesn't bring up the fact that pages expire immediately because they don't have an expire time - it only talk about how users sohuld be able to control the lifetime of content in the cache. While taking care of bug 80731 would make this problem go away, I don't think the HTTP networking code makes a good assumption about how to calculate a freshness values, despite what RFC2616 says. I think they assumed that content with a recent modification time is content that is being generated dynamically, which is not the case here. (Nor with most sites that don't use expiration times but have recently updated their content - and this is a large chunk of the Internet!) For what it's worth, Internet Explorer doesn't expire content that lacks an expiration time.
Well.. Now it's working. Perhaps the server wasn't responding to if-modified conditionals correctly. Also, I got validation and expiration mixed up: Expiration & max-age only specify whether the browser will *attempt* to do a revalidation rather than retransferring the data unconditionally.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.