[Opera-Linux] How to reload faster?
Eirik Byrkjeflot Anonsen
eirik at opera.com
Mon Jun 11 07:43:33 UTC 2007
Daniel Eckl <daniel.eckl at gmx.de> writes:
> I now tried this. Going back to digg.com takes about 2 seconds for me.
> I'm running on a Dual Core 1,8 Ghz. If your CPU is slower, it might take
> longer to render the content, so 5 to 10 seconds sounds possible.
>
> I traced my network traffic with wireshark and I I found out that one
> thing is being transfered when going back: A hit counter image from
> another server of digg.com. This image is being transfered with these
> HTTP Response Headers:
> Date: Sat, 09 Jun 2007 09:43:01 GMT
> Cache-Control: no-cache, private, must-revalidate
> Pragma: no-cache
> Expires: Sat, 09 Jun 2007 09:43:02 GMT
> (as you can see, the expiration date is on second after the response)
>
> So it's wanted that a browser fetches this image every time.
> Now I think that a history back action is thought to fetch EVERYTHING
> from the cache to be able to show the exact state you saw when you
> visited it. But now there's a dilemma: Opera is not allowed to cache
> this image when it first gets it. But when you go back in history, opera
> is supposed to show it to you...
>
I believe the http spec (rfc 2616) says that those cache settings
don't apply to history navigation. When going back in history, you're
not "going to the page again", rather you're going "back to the page
as it was in the past". Actually, "back to the page as you saw it
previously" (any form elements filled in should still be filled in,
etc.). So the various no-cache settings have no meaning. Of course,
if the browser has forgotten what the page looked like, it will have
to reload the page, and then the cache settings may apply again.
On the other hand, there's a fabulous amount of random heuristics
stuck into the code because it makes the web work better... I don't
know if this is one of those cases.
eirik
More information about the Opera-Linux
mailing list