Monday, November 16, 2009

Browser reload

A question for the tech-heads:
It seems to me web browsers typically either: 1) Load the page you ask for, from cache (from disk) if it has it, regardless of whether the page has been changed or 2) loads the page afresh, regardless of whether it's in the cache.

Safari used to do the latter, now it seems to do the former, which is quicker, but you have to refresh to be sure you have the latest version. So why doesn't the browser just ask the server if the page has been updated since last visit, and then refresh the page only if it's been changed?

11 comments:

  1. So why doesn't the browser just ask the server if the page has been updated since last visit, and then refresh the page only if it's been changed?

    In Opera you can assign its behaviour at Preferences/Advanced/History: "Check website for a newer version never/always/every xx minutes".

    In Firefox I have not found it yet in the "normal" preferences, probably it is somewhere in "about:config" (it's for advanced preferences, there you have to know exactly what you are doing).

    In Safari I don't know, but usually this possibility of assigning it should be there somewhere. Maybe the different behaviour is just since your OS update, so the preferences are now different compared to before?

    ReplyDelete
  2. Addendum: Maybe that's a bit different from what you are looking for.

    ReplyDelete
  3. No, it might be helpful.
    Except I don't find such a preference in Safari.
    I love Apple's apps, but I have to admit, often the Preferences are rather basic. They sometimes go a *little* bit overboard in simplification.

    ReplyDelete
  4. Maybe loading "about:config" like a website gives you the advanced preferences in Safari, as it is in Firefox?

    ReplyDelete
  5. I was going to say "oh that's easy in Firefox". I remember that option in Netscape, and I believe in SeaMonkey, but now, in Firefox (latest version) I can't find it even in the help.

    Must still be there, but there was the options

    always from cache
    always from server
    from server if newer

    Just what you are looking for.

    Will look some more (but not that hard)

    ReplyDelete
  6. Right! I remember those options from Nescape Navigator. Rather amazing, since it's been almost a decade since I used it.

    ReplyDelete
  7. It can be complicated further by http page attributes supplied by the server (and proxies) as well. The server can mark a page as not to be updated until some date, and it can mark the page as always update. And other variations too. How browsers respond to that and how they combine that with your own choices to make the decision can be baffling and open to interpretation. As a programmer even when I intentionally tag images or static pages as good until some date browsers will often request the content anyway. And then many web programmers don't bother tagging pages for efficiency anyway.

    ReplyDelete
  8. Note a useful hot key in Firefox is Ctrl-F5. Not sure about other browsers but this can be used like F5 to reload a page but forcing refresh from server.

    ReplyDelete
  9. Efficience of the web or efficiency in their work?

    I remember forced refresh. Some years ago it was a big deal to me, sometimes none of the browsers wanted to reload properly. But it's never been an issue with safari. (Fortunately, since it does not seem it has the command.)

    ReplyDelete
  10. That's why I like IE.
    Almost everything is under my control on all of its behaviour.
    It is in:
    Tools > Internet Options > (General) > Browsing History
    for IE.
    Sorry, I can't even deal with Firefox or Safari, because I don't use the latter and I hate the options menu of Firefox.

    ReplyDelete
  11. I've got IE, and Ctrl-F5 has become a reflex when I connect to some regular sites.

    ReplyDelete