Good evening people! I have such a problem, why, for example, if you make Navigation 400px wide and open it in Google Chrome for the first time, then it shows everything correctly, but if you change the navigation width from 400 to 700px and open it again in the browser, then Chrome still shows navigation 400px wide, and if I delete the history of the site and again I go as if for the first time, then the navigation becomes 700px. In general, any changes in the code are updated in Chrome only if you clean the history each time. Why is that???

Psv mozilla et al. Everything works fine and no need to clean the history after every code change.

  • press Ctrl + F5 - n.osennij

1 answer 1

The problem appeared in version 56 . Now the browser more fully uses the local cache. Due to the fact that the number of verification requests to the server has decreased by 60%, the page reload speed has increased to 28%. However, because of this, the browser cannot now correctly determine that CSS has been updated.

To upload each new CSS, you can use the following combination:

<link rel="stylesheet" href="/styles/main.css?<?php echo time(); ?>"> 

PHP insert substitutes the current time and the following code is obtained:

 <link rel="stylesheet" href="/styles/main.css?1401823964"> 

True, this option is not entirely correct and it is worthwhile to write a more advanced creation of versioning CSS.