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]
精彩评论