Closed Bug 274382 Opened 20 years ago Closed 19 years ago

loading live bookmarks bypasses cache

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: syskin2, Assigned: vlad)

References

Details

(Whiteboard: [asaP2])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

When firefox starts, it loads all live bookmarks. The problem is it completely
ignores its own cache when doing so. Moreover, it sends:
  Pragma: no-cache
  Cache-Control: no-cache
in http headers, thus completely bypassing any proxy that is on the way.
This is a huge waste of bandwidth, both ours and server's.


Reproducible: Always

Steps to Reproduce:
1. Subscribe to a live bookmark, observe that it has (very often) ETag and/or
(often) Last-Modified header and/or (less often) Cache-Control: max-age header.
2. Start firefox, use Live HTPP Headers extension to see what happens

Actual Results:  
All rss feeds are loaded bypassing the cache

Expected Results:  
Firefox sends If-None-Match and If-Modified-Since headers, like explained in
HTTP specs and for obvious reasons.
Hrm. Confirmed on 20041209 trunk, with http://philringnalda.com/index.xml which
has a max-age and can be counted on not to have changed the Etag, either ;)

Offhand, that doesn't seem like a good thing to do: there are times when I
restart the browser several times over just a few minutes, plus that's going to
make us more sluggish than we need to be at startup. Is there some reason not to
trust the cache at startup, or is that just an accident?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Oh, d'oh. It's not just startup, is it? This bug is actually "back out bug
255458" because we *always* bypass the cache, and are thus *always* a horribly
misbehaved HTTP client: when we have a perfectly good Etag or Last-Modified, we
ignore it and insist on downloading the whole file again instead of getting a
304 Not Modified. For a random example of why I keep saying we need to be very
well-behaved about fetching feeds, see
http://laughingmeme.org/archives/002656.html where the author of the most
widely-used PHP library for parsing RSS says you should just ban anything that
doesn't support conditional GET by user-agent.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041223
Firefox/1.0+

Ouch.
OS: Windows 2000 → All
Hardware: PC → All
Or, rather, if I understand nsIRequest, not back out bug 255458 but use
nsIRequest::VALIDATE_ALWAYS instead of nsIRequest::LOAD_BYPASS_CACHE. Shouldn't
that get us the behavior we want, always getting a new file if it's changed,
without doing aggressive no-cache requests where we ignore the date and ETag we
could be sending?

I got banned from an RSS feed the other day, for using an ill-behaved HTTP
client. Just a friend's weblog, but he banned me anyway.
Flags: blocking-aviary1.1?
Whiteboard: [asaP2]
*** Bug 288282 has been marked as a duplicate of this bug. ***
more "don't do dumb stuff"

vlad, punt this to me if you don't have cycles.
Assignee: vladimir+bm → vladimir
Flags: blocking-aviary1.1? → blocking1.8b4+
Aiee.. yes, you're right, we should be using VALIDATE_ALWAYS...
Attachment #190392 - Flags: review?(mconnor)
Attachment #190392 - Flags: review?(mconnor)
Attachment #190392 - Flags: review+
Attachment #190392 - Flags: approval1.8b4+
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs, filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → bookmarks
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: