What is firefox prefetching?
What is firefox prefetching?
Posted Jun 17, 2005 2:26 UTC (Fri) by xoddam (subscriber, #2322)In reply to: What is firefox prefetching? by beejaybee
Parent article: What is firefox prefetching?
> even if only as far as the browser cache.
That *sounds* like a neat situation -- record the http session and don't
"replay" it into the browser proper (setting cookies, etc.) until the
user has explicitly requested the page.
Unfortunately many websites don't just give you a page when you first
make your http request, but rather set some cookies in a 'redirect' or
'continue' response, and can give you all sorts of silly responses if you
don't reply with the cookie.
So at best, to prefetch a whole page without accepting cookies into the
cache, you'd have to do it in a sandbox which can handle its own cookies.
If you want to support scripts too (necessary for fetching images in many
cases) it becomes ludicrously complex.
I'd rather not prefetch at all.
Posted Jun 20, 2005 12:18 UTC (Mon)
by gdt (subscriber, #6284)
[Link]
That's assuming the prefetch has to be perfect. Even fetching the redirect page will cut out one round-trip time (that's 0.2s for international users of US websites, sounds small but remember from User Interfaces 101 that a response time >0.3s is perceived as "slow"). With that in mind, prefetch using the current set of cookies and stop when it requires a cookie to be written. If the user selects the prefetched page then write that cookie and continue. That means that some pages are "prefetch unfriendly", but that's the case anyway (the discussion about multiple sets of cookies is really about how to work around that unfriendliness).
No need for prefetch to be perfect