JanisOzolins JanisOzolins - 14 days ago 9
CSS Question

CSS - why my browsers can't reflect any changes made on the server?

I was working on some CSS code and then suddenly the server stopped reflecting any changed made on the server. At first I thought it was a caching problem but I disabled caching on my browser and even tried using different browsers but still it's using the old version of my CSS file.

If I download my CSS file from the server and open in the text editor, it shows all the changes I made to the code but they don't reflect on my website at all. The site is using old version of the CSS file that doesn't even exist anymore on the server.

What on Earth is happening with my server? Can it be a router caching problem?

Answer

I can't answer this but try to add in your html, where you include the css this: ?v1.

Example: src="resources/yourDir/style.css?v1"

This will force everything to download the new css.

You can add after the ? everything you want. Like a timestamp, just a number or words. Whatever you like.