Reputation: 24218
For years I have appended a querystring to the end of my CSS whenever I made a change that needed to proliferate to client machines:
<link href="/Resources/styles/styles.css?v=1" rel="stylesheet" />
However, I have noticed lately that Chrome seems to be pretty "smart" about knowing when I have changed the CSS files and often the latest CSS shows up in testing without needing the querystring trick.
So I was wondering: have the modern browsers incorporated new logic to make the querystring trick unnecessary?
Thanks!
Upvotes: 2
Views: 79
Reputation: 1680
The trick isn't obsolete as browsers still have no way of knowing the file has been modified without requesting it, this is just a simple limitation of HTTP. Chrome might be able to guess that your CSS has changed if the markup has changed and it no longer seems to match, but I'm not too sure how this might be happening.
Upvotes: 1