Home > Article > Web Front-end > What should I do if the css is not updated after modification?
Solution to the problem that css does not update after modification: 1. Clear the browser cache before debugging; 2. Check "Disable cache" on the debugging page; 3. Use "ctrl shift R" to force refresh; 4. Modify css and js code.
The operating environment of this article: windows7 system, HTML5&&CSS3 version, Dell G3 computer.
In the process of web development, we often need to debug js code, and at this time our modified code 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 how the Chrome browser solves this problem.
Chrome css modification does not update solution:
Method 1: Clear the browser cache before debugging
In the browser settings interface
Or use the shortcut key to directly clear the cache ctrl shift delete
2. Set the browser not to cache the page
Check Disable cache on the debugging page
3. Force Refresh the page
Use ctrl shift R to force refresh and refresh the page without using the browser cache
4. Solve the caching problem from the code perspective
The browser will cache css or js file, by setting and changing the version number, the browser will re-download the new js or css file. Add ?v= after js or css. The usage of the version number is as follows
css and js with parameters (in the form .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’ />
Recommendation: "css video tutorial"
The above is the detailed content of What should I do if the css is not updated after modification?. For more information, please follow other related articles on the PHP Chinese website!