I need to make sure when the user hits back with, for example, the mouse, the browser doesn't instantly load the page from the cache and instead runs the associated code again.
This is what my .htaccess looks like. It appears to be just Firefox that is ignoring the cache settings.
<IfModule mod_expires.c>
ExpiresActive On
# ExpiresDefault A2630000
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType image/ico "access plus 1 year"
ExpiresByType image/gif A2630000
ExpiresByType image/jpeg A2630000
ExpiresByType image/png A2630000
ExpiresByType application/x-javascript M2630000
ExpiresByType text/css M2630000
</IfModule>
<IfModule mod_headers.c>
Header set Cache-Control "public"
</IfModule>
#make php scripts uncacheable
<FilesMatch "php">
Header unset Cache-Control:
Header append Cache-Control: "no-cache, must-revalidate"
</FilesMatch>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript