谷歌浏览器保存了某些页面的html文件无法正常显示

时间:2018-02-14 19:23:17

标签: jquery html css google-chrome web

我不记得这是否有效,但我在下载某些网页html文件方面遇到了问题,因为他们无法在Google Chrome上正常显示。但是,如果我在其他浏览器(如Microsoft Edge或Internet Explorer本身)上打开它们,我可以看到该页面没有任何问题。

我将以https://developer.valvesoftware.com/wiki/Main_Page

为例

转到该页面,您应该会看到默认情况下的外观。

现在这就是下载它的html(带文件夹的完整html)后的样子,然后用谷歌浏览器打开它。

Picture 1

但如果我在Internet Explorer上打开它,它根本不应该是这样的。

Picture 2

正如您在Internet Explorer上看到的那样,它在Microsoft Edge上看起来很不一样,可能是某些小东西不会显示但是这些都没关系。

错误:

[Deprecation] CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.
Valve%20Developer%20Community.html:12 Resource interpreted as Stylesheet but transferred with MIME type text/plain: "file:///C:/Users/user/Downloads/Valve%20Developer%20Community_files/load(1).php".
load.php:1 Uncaught ReferenceError: mw is not defined
    at load.php:1

(anonymous) @ load.php:1
Valve%20Developer%20Community.html:13 Resource interpreted as Stylesheet but transferred with MIME type text/plain: "file:///C:/Users/user/Downloads/Valve%20Developer%20Community_files/screen.less".
load(2).php:17 GET file:///C:/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=valve&version=20141001T014210Z net::ERR_FILE_NOT_FOUND

(anonymous) @ load(2).php:17
load(3).php:154 GET file:///C:/w/load.php?debug=false&lang=en&modules=jquery.client%2Ccookie%2CmwExtension%2Cthrottle-debounce%7Cmediawiki.legacy.ajax%2Cwikibits%7Cmediawiki.notify%2Ctoc%2Cutil%7Cmediawiki.page.startup%7Cskins.vector.js&skin=valve&version=20171215T202648Z&* net::ERR_FILE_NOT_FOUND
addScript @ load(3).php:154
doRequest @ load(3).php:158
work @ load(3).php:160
request @ load(3).php:157
load @ load(3).php:164

(anonymous) @ Valve Developer Community.html:34
Valve Developer Community.html:255 GET file:///C:/w/skins/common/images/wiki.png net::ERR_FILE_NOT_FOUND

load(3).php:154 GET file:///C:/w/load.php?debug=false&lang=en&modules=jquery.checkboxShiftClick%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Csuggestions%7Cmediawiki.action.view.postEdit%7Cmediawiki.api%2Ccldr%2Chidpi%2CjqueryMsg%2Clanguage%2CsearchSuggest%2Cuser%7Cmediawiki.language.data%2Cinit%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cskins.vector.collapsibleNav&skin=valve&version=20171215T202648Z&* net::ERR_FILE_NOT_FOUND
addScript @ load(3).php:154
doRequest @ load(3).php:158
work @ load(3).php:160
request @ load(3).php:157
load @ load(3).php:164

(anonymous) @ Valve Developer Community.html:259
Valve Developer Community.html:1 Failed to load https://developer.valvesoftware.com/w/index.php?action=ajax: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not 

但是为什么Google Chrome显示不正确?在Icognito模式下,它也没有正确显示,它不是因为看起来像设置,你可以尝试重现它自己看。

我希望你能帮助我。

1 个答案:

答案 0 :(得分:0)

这看起来很清楚,肯定会解释屏幕截图中显示的行为:

  

无法从file:网址加载CSS,除非它们以.css文件扩展名结尾。