开发者

Back Button in IE shows plain xml instead of loading xsl stylesheet

开发者 https://www.devze.com 2023-01-19 02:37 出处:网络
IE has weird behaviour when pressing the back button. When trying to open a webpage, the server sends a 302 response that redirects the client to a login XML page with an XSL stylesheet. After the use

IE has weird behaviour when pressing the back button. When trying to open a webpage, the server sends a 302 response that redirects the client to a login XML page with an XSL stylesheet. After the user successfully logged in, another page is loaded. However, when the u开发者_JAVA技巧ser presses the "back button" and returns to the login page, IE shows only the raw XML values as plain text instead of executing the XSL stylesheet.

All pages have "no-cache" policy.


Use .htaccess or IIS configuration to check the ACCEPT request header for wildcards, then prevent parsing XML or XSLT files as plain text:

RewriteCond %{HTTP_ACCEPT} \*.\*$ 
ReWriteRule .*\.(xsl|xml)$ - [F]
0

精彩评论

暂无评论...
验证码 换一张
取 消