I'm using .htaccess to cache the js / css / etc files online. Everything works fine, but for whatever reason my pages get cached, too. I investigated the headers, and delay pills work such as this:

  1. Browser demands a webpage http://poko.lt/up
  2. Server responds with 301 to http://poko.lt/up/ (with Date and Last Modified headers comparable to current time)
  3. Browser demands http://poko.lt/up/
  4. Server responds using the page, with Date and Last Modified headers comparable to my last forced refresh (like, yesterday), but Cache-control header is okay (max-age=)
  5. I recieve that old version from the page :/

My .htaccess appears like this:

# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0

# 1 YEAR
<FilesMatch "\.(jpg|jpeg|png|gif|svg|eot|ttc|ttf|otf)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
Header unset Last-Modified
Header unset ETag
FileETag None
</FilesMatch>

# 2 WEEKS
<FilesMatch "\.(css|js|swf)$">
ExpiresDefault A1209600
Header append Cache-Control "proxy-revalidate"
Header unset Last-Modified
Header unset ETag
FileETag None
</FilesMatch>

# NO CACHE
<FilesMatch "\/$">
ExpiresDefault A0
Header append Cache-Control "proxy-revalidate"
Header unset Last-Modified
Header unset ETag
FileETag None
</FilesMatch>

And, it's possible to test drive it using the website http://poko.lt (the 3 red-colored symbols within the top center of the page are the type leading to the issues). I'm using FF4, and checking headers with Firebug.