: How to force browsers to always reload xslt files? Related: Apache: How can I force the browser to reload CSS files? I'm building an xml page (on an apache2) that is supposed to be translated
Related: Apache: How can I force the browser to reload CSS files?
I'm building an xml page (on an apache2) that is supposed to be translated to xhtml by the browser, so my server also serves a main.xslt which is used as stylesheet by the xml file, similar to the scenario with the css files in the linked question.
However, none of tricks provided in either that answer, nor some issues on SO solve the issue for Opera. While Firefox responds to F5 by fetching not only the xml file but also the xslt file, Opera only reloads the xml file. I tried both, setting the Last-Modified HTTP header via an .htaccess file and using the expires module of apache2.
This is what my .htaccess looks right now:
AddType text/xsl;charset=utf-8 .xslt
ExpiresByType text/xsl "modification plus 1 second"
Header set Last-Modified "Wed, 08 Jan 2000 23:11:55 GMT" #Header set Last-Modified "Wed, 08 Jan 2020 23:11:55 GMT"
If I open the xsl myself and manually reload it, the xml presentation is updated as well, but this is tedious for development.
Note: There is no php or any kind of scripting involved. Everything is static.
More posts by @Cooney921
2 Comments
Sorted by latest first Latest Oldest Best
According to www.askapache.com/htaccess/using-http-headers-with-htaccess.html#100_Prevent_Files_cached, this should do the trick:
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.