×
  • remind me tomorrow
  • remind me next week
  • never remind me
Subscribe to the ANN Newsletter • Wake up every Sunday to a curated list of ANN's most interesting posts of the week. read more

Forum - View topic
ANN caching attributes




Anime News Network Forum Index -> Site-related -> Bugs & Technical Questions
View previous topic :: View next topic  
Author Message
Dolda2000



Joined: 18 Mar 2004
Posts: 10
Location: Täby, Sweden
PostPosted: Fri Jan 05, 2007 12:25 am Reply with quote
I recently installed Squid on my local network to cache HTTP requests. One of the things I was hoping for was that repetitive requests to ANN (I usually go back and forth quite a bit between the same set of pages when browsing the encyclopedia) would be sped up by not having to go to the real server for every request, but I was disappointed to discover that the PHP scripts on ANN don't set any caching attributes, so they cannot be cached.

If at all possible, couldn't you support the Last-Modified or If-Modified-Since headers? After all, it would probably decrease your used bandwidth quite a bit as well, thanks to other third parties caching.
Back to top
View user's profile Send private message Visit poster's website My Anime My Manga
Dan42
Chief Encyclopedist


Joined: 02 Jan 2002
Posts: 3793
Location: Montreal
PostPosted: Fri Jan 05, 2007 4:50 am Reply with quote
1. We need to place different ads on every page, so caching basically works against us. We'd need to switch to a javascript or iframe-based advertising scheme to be able to support caching like you want. Furthermore, each page is customized for the logged in user so caching is of limited use, i.e. we'd only be able to support caching for anonymous visitors.

2. If-Modified-Since is *very* difficult to implement in dynamic pages because it requires to take into account every variable that goes into the creation of the page in order to know when was the last modification. It's *far* easier to just generate the page every time.

3. There is no such thing as "caching attributes". There are only no-caching attributes. Unless the server specifically forbids caching, proxies should be able to cache the results (although I'm not sure what strategy they could use without the Last-Modified header). That being said, I just checked and I was suprised to find that the articles are being displayed with "Cache-Control: no-cache". I'll look into removing that.
Back to top
View user's profile Send private message Visit poster's website AIM Address My Anime My Manga
Display posts from previous:   
Reply to topic    Anime News Network Forum Index -> Site-related -> Bugs & Technical Questions All times are GMT - 5 Hours
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group