开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜