简体   繁体   中英

External CSS and JavaScript files not caching?

All of the sudden (at least so it seems), both Chrome and Firefox behave very strangely when it comes to viewing the source code of a web page. While normally I should be seeing the source like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Dynamic Map Application - HTML & JavaScript</title>

    <link rel="stylesheet" type="text/css" href="resources/css/styles.css" />
    <link rel="stylesheet" type="text/css" href="resources/css/colorbox.css" />
</head>
...

I now see it like (copied exactly as the browser shows it to me):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Dynamic Map Application - HTML & JavaScript</title> <style type="text/css" style="display:none">/**
  * CSS Reset styles 
  */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 
    margin:0;
    padding:0;
}
...

As if the style sheets and scripts are not external. This is not normal behavior and it did not happen before. And it's affecting how the browser caches external files (ie it doesn't).

Can anyone help with this issue? Thanks in advance!

I had a similar problem that was caused by a proxy. Make sure you are not using one, directly or indirectly (perhaps your work place installed one).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM