简体   繁体   中英

XSLT stylesheet does not reload

Hey, I got a static page which uses an XSLT stylesheet and pulls in the overall menu from a separate menu.xml .

Usually, the menu wont change, neither will the stylesheet. However, at some point they may, because the content is modified. In any case, the auxiliary styling files are not reloaded when you reload the main page.

Essentially, my question is: how do I get the browser to update the additional files when they change (I could live with it reloading it all the time, but it would be better if there was a way to have it pulled in only when it actually changes)?

I pull the stylesheet in with

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="main.xslt" type="text/xsl"?>
<foo>
  <bar />
</foo>

Edit: On a side node, if I explicitly open the stylesheet or the menu-file in the browser, an then reload the main page, it updates correctly, but obviously, that is not an option.

您可能希望使用Last-Modified HTTP标头提供样式文件的修改时间。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM