I am using client side XSLT to render an XML document as HTML. The XSLT is referenced in the XML file and executed automatically by the browser, such as this:
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="xslt.php"?><root>1421744643</root>
This works as expected, however on Internet Explorer (9, 10 and 11) I notice that the XSLT file will be downloaded for every request, although the HTTP response that serves the file is marked as cacheable.
The HTTP response for the XSLT is actually
Date: Tue, 20 Jan 2015 09:03:42 GMT
Server: Apache/2.2.29 (Unix)
X-Powered-By: PHP/5.3.29
Cache-Control: max-age=100000
Content-Type: text/xsl
Connection: Keep-Alive
Age: 705
Content-Length: 583<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheetversion="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:outputmethod="html"version="1.0"encoding="UTF-8"indent="yes"/><xsl:templatematch="root"><html><head></head><body><div><div>XSLT time: 1421744622</div><div>XML time:<xsl:value-ofselect="."/></div><div><ahref="xml.php">reload</a></div></div></body></html></xsl:template></xsl:stylesheet>
Other browsers such as Chrome or Firefox do cache the XSLT and will only fetch the XML document.
Is this a known problem with Internet Explorer? Are there any workarounds? A testpage for this is http://www.carsten-leue.de/test/iframe_xslt/index.html
Carsten