We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ie9 错误: SEC7113: CSS 因 Mime 类型不匹配而被忽略 main.min.css?ver=0.1.3
chrome: Resource interpreted as Stylesheet but transferred with MIME type text/plain: "http://localhost:8678/java-china/assets/styles/main.min.css?ver=0.1.3".
百度了一下,此问题,应该需要在response的按照 后缀名 (.css) 设置 contextType的 text/css
研究了一下源码:
DispatcherHandler 中 print 的时候设置一下?是否正确?还需要作者考虑一下。
方案: 可以根据web.xml里的配置来进行设置。
css text/css
不知道能否修正这个问题,如果加载远程的css (配置成您官方的https://java-china.org/assets/styles/main.min.css 不会出现问题)是没有问题的,但放到本地加载会出现此问题。
谢谢!!!!!
The text was updated successfully, but these errors were encountered:
请问这个问题怎么解决?
Sorry, something went wrong.
这个没有问题啊
应该是一个bug,改了一下源码,可以解决此问题。 DispatcherHandler 90行处添加代码: if (uri.matches(".+(css)$")) {//|js|ico|swf response.raw().setContentType("text/css;charset=utf-8"); } else if (uri.matches(".+(js)$")) { response.raw().setContentType("text/javascript;charset=utf-8"); } else if (uri.matches(".+(ico)$")) { response.raw().setContentType("image/x-icon;charset=utf-8"); } else if (uri.matches(".+(swf)$")) { response.raw().setContentType("application/x-shockwave-flash;charset=utf-8"); } else if (uri.matches(".+(jpe)$") || uri.matches(".+(jpeg)$") || uri.matches(".+(jpg)$")) { response.raw().setContentType("image/jpeg;charset=utf-8"); } else if (uri.matches(".+(png)$")) { response.raw().setContentType("image/png;charset=utf-8"); }
ie9以上出现无法加载,google浏览器上出现warning
No branches or pull requests
ie9 错误:
SEC7113: CSS 因 Mime 类型不匹配而被忽略
main.min.css?ver=0.1.3
chrome:
Resource interpreted as Stylesheet but transferred with MIME type text/plain: "http://localhost:8678/java-china/assets/styles/main.min.css?ver=0.1.3".
百度了一下,此问题,应该需要在response的按照 后缀名 (.css) 设置 contextType的 text/css
研究了一下源码:
DispatcherHandler 中 print 的时候设置一下?是否正确?还需要作者考虑一下。
方案:
可以根据web.xml里的配置来进行设置。
不知道能否修正这个问题,如果加载远程的css (配置成您官方的https://java-china.org/assets/styles/main.min.css 不会出现问题)是没有问题的,但放到本地加载会出现此问题。
谢谢!!!!!
The text was updated successfully, but these errors were encountered: