Chrome 未加载样式表

发布于 2024-12-07 20:20:01 字数 430 浏览 0 评论 0原文

似乎 Google Chrome 没有根据样式表显示我的网站。

当页面第一次加载时,它加载得很好......但随后它会在页面加载结束时更改为原始 html 格式。

它最终看起来像这样(您可以在顶部栏看到网址):

[单击查看完整尺寸]

在此处输入图像描述

我有 2 个样式表,一个是用户可以通过以下方式切换的“替代”样式表单击顶部的浅色/深色按钮网站右侧。

为什么会发生这种情况?我以前从未遇到过问题。

我的规格:Mac OS X 和 Google Chrome 14.0.835.186

Seems like Google Chrome is not displaying my site according to the stylesheet.

When the page first load, it loads fine...but then it changes to raw html format towards the end of the page load.

It ends up looking like this (you can see web address at the top bar):

[click for full size]

enter image description here

I have 2 style sheets, one is an "alternative" that a user can switch between by clicking the Light/Dark buttons at top right of the site.

Why is this happening? I never had a problem before.

My specs: Mac OS X with Google Chrome 14.0.835.186

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

时光与爱终年不遇 2024-12-14 20:20:01

您是否安装了 HTTPS 无处不在 + Adblock?如果是这样,我发现当主站点没有或有限的 https 支持时,点击 google 搜索结果通常会产生这种行为。

例如,当我搜索并单击 XKCD 漫画时,我注意到使用这些扩展的相同行为。

暂时禁用所有地方的 https,或者重新输入不带 https 的 URL 似乎可以解决这个问题。

Do you have HTTPS everywhere + Adblock installed? If so, I've found that clicking through google search results will often produce this behavior when the main site has no, or limited https support.

I notice the same behavior, with those extensions, when I search for and click through an XKCD comic, for example.

Temporarily disabling https everywhere, or re-entering the URL without https seems to fix it for me.

み零 2024-12-14 20:20:01

也许是你这边的缓存问题。你能尝试“Shift+Ctrl+R”吗?

Maybe a caching problem on your side. Can you try "Shift+Ctrl+R"?

眸中客 2024-12-14 20:20:01

我在 OS X 上尝试了与您相同的 Chrome 版本,并且所有内容都在深色和浅色版本中正确呈现。这对你来说可能是一个缓存问题。重新加载页面时按住 Shift 键。这将强制浏览器获取所有资源并忽略缓存的版本。

I tried this on OS X with the same Chrome version as you and everything is rendered correctly for the dark and light versions. It could be a caching problem for you. Hold down the shift key while you reload the page. This will force the browser to get all of the resources and ignore the cached versions.

烙印 2024-12-14 20:20:01

遇到了同样的问题,花了几个小时绕圈想知道“我到底做了什么!”,我尝试了这个网站和其他许多网站的许多建议,但对我有用的东西,事后我觉得有点愚蠢,因为没有尝试禁用 chrome 的广告拦截器,然后按 Shift+F5 并解决问题。

Had this same issue, spent hours going around in circles wondering "What the hell have I done!", I tried many of the suggestions from this site and many others but the thing that worked for me and I felt kind of stupid afterwards for not trying it was to disable ad-blocker for chrome, followed by a shift+f5 and problem solved.

柏林苍穹下 2024-12-14 20:20:01

在我朋友的笔记本电脑上,这是由一些 DNS 问题引起的。将 DNS 更改为 8.8.8.8 后一切正常。

On my friend's laptop it was caused by some DNS problems. After changing DNS to 8.8.8.8 everything is fine.

屋顶上的小猫咪 2024-12-14 20:20:01

将 css 字符集更改为 UTF8。它解决了我的问题。

Change css charset to UTF8. It fixed my issue.

醉酒的小男人 2024-12-14 20:20:01

我有这个问题。当我添加 Chrome 扩展“Akamai 调试标头”时,它就开始了。这导致随机站点的 CSS 无法加载并显示 CORS 错误。

我关闭了扩展程序,一切又恢复了。

所以也许禁用所有扩展然后测试 Chrome

I had this issue. It started when I added a Chrome extension 'Akamai Debug Headers'. This caused random sites' CSS not to load and displayed CORS errors.

I turned off the extension and it all worked again.

So maybe disable all extensions and then test Chrome

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文