Resource interpreted as Stylesheet but transferred with MIME type text/html: “**.jsp“,主要因为拦截器将所有资源拦截
1. 问题描述
网页内容正常加载,但是没有样式,而且样式路径是正确的,F12打开控制台看到提示“Resource interpreted as Stylesheet but transferred with MIME type text/html: "**.jsp"”。
2. 解决方案
网上有一些博客提到这个错误是因为ContentType设置为“text/html”导致的,但是这个问题,后面还有一串提示是和jsp相关,所以我的问题不是因为ContentType,最后经过搜索以及筛选,确定这个问题是过滤器将特定目录下的所有资源拦截,但我们其实只是想拦截该目录的html文件和servlet请求。所以我们需要在过滤器中将js、css等其它文件放行,过滤器简单代码如下。
3. 新出现的问题
这样的话,某些js脚本是不是突破拦截,直接访问后台,这个还有待评估。
Resource interpreted as Stylesheet but transferred with MIME type text/html: “**.jsp“,主要因为拦截器将所有资源拦截相关推荐
- 【SpringBoot】浏览器报错Resource interpreted as Stylesheet but transferred with MIME type text/html
CSS 样式不能正常加载 发现页面的样式没有显示,报错信息如下: Resource interpreted as Stylesheet but transferred with MIME type t ...
- 【JavaWeb】已解决:Resource interpreted as Stylesheet but transferred with MIME type text/html
跑了一下两个月之前写的项目,结果出现: 是因为Filter过滤器误伤到了css,注释掉就好了.
- CSS文件未加载浏览器报警告:Resource interpreted as Stylesheet but transferred with MIME type text/html...
JavaWeb项目中CSS样式丢失 问题:bootstrap.css未完成加载,但响应正常 错误定位:filter过滤器写了一句response.setContentType("text/h ...
- Resource interpreted as Stylesheet but transferred with MIME type application/x-css
用tornado做了一个简单的页面.结果页面中的css被加载了,但是没有效果.用谷歌浏览器调试,说是Resource interpreted as Stylesheet but transferred ...
- Resource interpreted as Script but transferred with MIME type text/plain:
我用script做ajax跨域,请求返回的是个文本字符串,chrome提示: Resource interpreted as Script but transferred with MIME type ...
- 关于错误Resource interpreted as Script but transferred with MIME type text_html
Created by Jerry Wang, last modified on Aug 03, 2014 某ui component里的javascript不work,通过Chrome F12 Con ...
- easyui提交form数据显示Resource interpreted as Document but transferred with MIME type application/json问题
今天在用easyui写一个提交表单数据时候,碰到了浏览器提示Resource interpreted as Document but transferred with MIME type applic ...
- MIME type (‘text/html‘) is not a supported stylesheet MIME type, and strict MIME checking is enabled
项目场景: 在index.html中引入一个css文件 问题描述 在index.html中引入一个css文件,报如下错误: Refused to apply style from 'http://lo ...
- 【Django】MIME type (‘text/html‘) is not a supported stylesheet MIME type | uWsgi | Nginx
问题分析 这是浏览器正常的请求类型分析:互联网上的资源有各种类型,通常浏览器会根据响应头的Content-Type字段来分辨它们的类型.例如:"text/html"代表html文档 ...
最新文章
- 拿下丰厚的年终奖,却未能拯救总薪酬,2021 年度 IT 薪酬调查报告出炉!
- 定义/赋值数组、 expect预期交互
- UA MATH571A 一元线性回归II 统计推断2
- OpenShift 4 - 安装3Scale API Management环境
- gnu java_【Java学习笔记】修饰符
- 程序员竟然钟爱这个!我 low了
- 深度学习的研究方向: 你会为AI转型么?
- 向量-创建数组-linspace/logspace函数
- kaggle泰坦尼克号
- python常用的颜色英文表达_面料颜色中英文翻译对照表
- MSP430F149小系统开发板实现RS232串口通信
- 公众号运营,如何快速找到内容定位?
- 时间精力管理4象限法
- python测验6_测验6: 组合数据类型 (第6周)
- 苹果电脑破音的解决办法
- Intel oneAPI Base Toolkit 安装教程(Linux)
- DataGear 轻松制作支持图表联动的全国地图、省级地图数据可视化看板
- 从阿里跳槽来的工程师,写个try catch的方式都这么优雅!
- php验证码有图片没数字,php验证码图片不显示
- 114 西崖 柳成龍