Skip to content
New issue

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

火狐浏览器 css 未载入,因为它的 MIME 类型 “text/html“ 不是 “text/css“ 页面无法显示问题 #701

Open
complicated2018 opened this issue Oct 12, 2023 · 11 comments

Comments

@complicated2018
Copy link

image

火狐浏览器微应用跳转后,css因为MIME类型不匹配页面无法显示,这个问题有什么解决办法吗。

@wisdomofgod
Copy link
Collaborator

wisdomofgod commented Oct 12, 2023 via email

@ClarkXia
Copy link
Collaborator

资源地址都是线上地址?

@complicated2018
Copy link
Author

公司内部vite+vue3的项目

@complicated2018
Copy link
Author

用的icestack
image

@ClarkXia
Copy link
Collaborator

看下网络请求的头信息,看着像 Content-Type 有问题

@complicated2018
Copy link
Author

image
chrome、edge都是没问题的,报了个js的MIME,但是能显示页面。
image

@complicated2018
Copy link
Author

Uploading image.png…
chrome的请求

@complicated2018
Copy link
Author

image
image
chrome里只有一个请求,firefox里多了个html类型的相关请求

@ClarkXia
Copy link
Collaborator

现在这个 Content-Type 明显是有问题的,关注下服务端的配置

@complicated2018
Copy link
Author

不好意思,忽略上一条,看错了,都有两条,但是这个在chrome里没问题,在firefox里有问题,都是同一个服务器,有点奇怪啊

@complicated2018
Copy link
Author

样式表单 http://10.8.20.100:31374/static/css/index-b458fc76.css 未加载,因为它的 MIME 类型 "text/html" 不是 "text/css"。 controller
[Vue Router warn]: uncaught error during route navigation: main-3d0a134f.js:29:380
Error: Unable to preload CSS for /static/css/index-b458fc76.css
__vitePreload http://10.8.20.100:32226/static/js/main-3d0a134f.js:24
__vitePreload http://10.8.20.100:32226/static/js/main-3d0a134f.js:24
__vitePreload http://10.8.20.100:32226/static/js/main-3d0a134f.js:24
__vitePreload http://10.8.20.100:32226/static/js/main-3d0a134f.js:24
BasicLayout http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
extractComponentsGuards http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
w http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
promise callbackw http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
g http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
g http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
v http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
install http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
use http://10.8.20.100:32226/static/js/main-3d0a134f.js:1
setupRouter http://10.8.20.100:32226/static/js/main-3d0a134f.js:29
setupAll http://10.8.20.100:32226/static/js/main-3d0a134f.js:42
mount http://10.8.20.100:32226/static/js/main-3d0a134f.js:42
combineLifecyle/</n[o]/</< http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
l http://10.8.20.100:31374/static/js/index-1a20167f.js:23
promise callback
s http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
o http://10.8.20.100:31374/static/js/index-1a20167f.js:23
mountMicroApp http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
mountMicroApp http://10.8.20.100:31374/static/js/index-1a20167f.js:23
loadApp http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
l http://10.8.20.100:31374/static/js/index-1a20167f.js:23
promise callback*s http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
loadApp http://10.8.20.100:31374/static/js/index-1a20167f.js:23
createMicroApp http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
2 http://10.8.20.100:31374/static/js/index-1a20167f.js:23
createMicroApp http://10.8.20.100:31374/static/js/index-1a20167f.js:23
reroute http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
i http://10.8.20.100:31374/static/js/index-1a20167f.js:23
__awaiter http://10.8.20.100:31374/static/js/index-1a20167f.js:23
__awaiter http://10.8.20.100:31374/static/js/index-1a20167f.js:23
reroute http://10.8.20.100:31374/static/js/index-1a20167f.js:23
reroute http://10.8.20.100:31374/static/js/index-1a20167f.js:23
start http://10.8.20.100:31374/static/js/index-1a20167f.js:23
setup http://10.8.20.100:31374/static/js/index-1a20167f.js:30
createHook http://10.8.20.100:31374/static/js/index-1a20167f.js:1
callWithErrorHandling http://10.8.20.100:31374/static/js/index-1a20167f.js:1
callWithAsyncErrorHandling http://10.8.20.100:31374/static/js/index-1a20167f.js:1
__weh http://10.8.20.100:31374/static/js/index-1a20167f.js:1
flushPostFlushCbs http://10.8.20.100:31374/static/js/index-1a20167f.js:1
j http://10.8.20.100:31374/static/js/index-1a20167f.js:1
mount http://10.8.20.100:31374/static/js/index-1a20167f.js:1
mount http://10.8.20.100:31374/static/js/index-1a20167f.js:1
setupAll http://10.8.20.100:31374/static/js/index-1a20167f.js:39
http://10.8.20.100:31374/static/js/index-1a20167f.js:39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants