Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Kimmax111068yThis is how I handle this:
Append a version get parameter on every linked file.
/css/main.css becomes /css/main.css?v=1.0
On each release the number gets incremented. The handling server should ignore unknown GET parameters, but the browser will handle it as a different file, hence force loading it. I automated it using some variables in VS but I don't know how exactly how I did it right now.
While debugging I use v1.0d1 or similar.
Works well and no more caching issues, especially when you deliver files with long cache times to reduce loading times. -
ymas4718yMost browsers have an option where you can disable the cache when the developer tools are open. I find that very useful.
-
Yup! Or if you're using symphony and forgot to dump your assets. OR if you're accidentally reloading the live page instead of your dev environment. #frontendproblems
-
Kimmax111068y@ymas @error503 ohh right. Using this you don't have to update the versions while developing. But don't forget to do it when you push the changes and have high cache times. Users will see a broken layout while you think everything is fine
Related Rants
There's not much worse than trying to fix your CSS for half an hour, only to realise that it's a cache issue...
undefined
html
css
web dev