A Daily WTF site WTF...



  • The site doesn't work properly with the browser prominently advertised on it!

    Am I the only person using Opera to browse this site? It seems that viewing a page never shows the latest version and always turns up a cached version. This doesn't happen with other sites/forums.



  • um....config?  



  • Opera is very agressive with caching by default: you'll see this behavior with a number of other sites such as a popular "not news" site

    Tools->Preferences->History, set "Check if cached page is updated on the server" from "Every 5 hours" to "Always".  Or you can just hit reload.



  • @edremy said:

    Opera is very agressive with caching by default: you'll see this behavior with a number of other sites such as a popular "not news" site

    Tools->Preferences->History, set "Check if cached page is updated on the server" from "Every 5 hours" to "Always".  Or you can just hit reload.

    That works. The [i]real[/i] WTF, however, is that the Daily WTF servers send a "Cache-Control: private" HTTP header. According to the RFC, this tells real stand-alone web cache systems to not cache the content, but for single clients (browsers) to use the cache if they have it. It should really be configured as "Cache-Control: no-cache" instead, as that is what is appropriate for a dynamic site such as a forum.



  • [quote user="djork"][quote user="edremy"]Opera is very agressive with caching by default: you'll see this behavior with a number of other sites such as a popular "not news" site

    Tools->Preferences->History, set "Check if cached page is updated on the server" from "Every 5 hours" to "Always".  Or you can just hit reload.
    [/quote]

    That works. The [i]real[/i] WTF, however, is that the Daily WTF servers send a "Cache-Control: private" HTTP header. According to the RFC, this tells real stand-alone web cache systems to not cache the content, but for single clients (browsers) to use the cache if they have it. It should really be configured as "Cache-Control: no-cache" instead, as that is what is appropriate for a dynamic site such as a forum.

    [/quote]

     Hrmm, you know, I bet that's why, in FireFox, the main Forums list 'Last post by' isn't correct - the odd caching going on.
     



  • I think Community Server is to blame for that - but everyone's bitched about the forums enough to make it old news ;)



  • Sadly, I think Opera won't give a rats ass for private/public, it'll cache either way.

     To get a versatile solution, I'd probably use something like:

    Cache-Control: max-age=xyz

     "Why?" you might ask, because you'd want a browser to cache it for a moment anyway, reducing the load slightly, yet not persisting the cache throughout sessions.

    If that doesn't work, fine, follow normal procedures and use no-cache as well as Pragma: no-cache.

    Edit: Wow, this Community Server-stuff is really a lot more appealing & alltogether impressive now.



  • [quote user="djork"][quote user="edremy"]Opera is very agressive with caching by default: you'll see this behavior with a number of other sites such as a popular "not news" site

    Tools->Preferences->History, set "Check if cached page is updated on the server" from "Every 5 hours" to "Always".  Or you can just hit reload.
    [/quote]

    That works. The [i]real[/i] WTF, however, is that the Daily WTF servers send a "Cache-Control: private" HTTP header. According to the RFC, this tells real stand-alone web cache systems to not cache the content, but for single clients (browsers) to use the cache if they have it. It should really be configured as "Cache-Control: no-cache" instead, as that is what is appropriate for a dynamic site such as a forum.

    [/quote]

     There is no problem in setting Cashe-Control: private for a forum, since it allows the usage of cashing. and you have a slightly off reading of the RFC defi. for Cache-Control:private djork.

    Cache-Control:Private just states the the current session is allowed to use the cache, which isn't a problem if you browser is able to query the site for updates to the cashed contents as assumed is a default behaivior.

    Now why shouldn't this site use cache control, since it is dynamic in content.. ? well the site data does not change all the time, therefor there is no reason to download more then a HTTP HEAD response before showing the casche if it is still valid.


Log in to reply