What should I do if the webpage Html5 development chrome does not update after changing the css source code

In fact, the first thing to look at is to see if you have changed the wrong code

In fact, the first thing to look at is to see if you have changed the wrong code

In fact, the first thing to look at is to see if you have changed the wrong code

(Brother's main problem is the Style.css file. Change it to the Styl.css file, just one word away)

If you are sure that you are not a novice and there is no problem with the code, you can use the following 4 methods, all of which are very useful.

In the process of web development, it is often necessary to debug js code, and at this time the code we have modified may not take effect. This is because the browser has a cache by default, but at this time, the cache will affect our debugging work. Here we will introduce the method for the chrome browser to solve this problem.

Chrome CSS modification does not update the solution:

Method 1: Clear the browser cache before debugging (this method is the most useless)

In the browser settings interface

Or use the shortcut key to clear the cache directly ctrl+shift+delete

(It's useless, I'm afraid to see the settings)

2. Set the browser to not cache the page

Check Disable cache in the debug page

3. Force a page refresh

Use ctrl+shift+R to force refresh without using browser cache to refresh the page

(Brother prefers to use this)

Fourth, solve the cache problem from the perspective of code

(The automatic modification of the code is good. If this function can be achieved, the code will be built every time you Save)

The browser will cache the css or js file. By setting and changing the version number, the browser will re-download the new js or css file. The usage of adding ?v= version number after js or css is as follows

css and js with parameters (such as .css?v= and .js?v= or .css?version= and .js?version=)

<script type=”text/javascript” src=”jsex.js?version=1.1.6″></script>
<link rel=’stylesheet’ href=’cssex.css?version=1.3.1′ type=’text/css’ />

In fact, there is a fifth method, which is to right-click Clear Cache. This is the most stupid method. You have to clear it every time.

The sixth method is to rename style.css, read it wrong, and read it back again, there must be no Cache

Still prefer method three

Guess you like

Origin blog.csdn.net/avi9111/article/details/123124414