How to disable CSS caching in development using a PHP backend?
P粉536532781
P粉536532781 2024-03-29 00:25:23
0
2
437

I'm working on a php/css project via localhost and almost every time I change the css and reload the page, the css remains the same until I delete cookies, cache and other site data (sometimes even then it doesn't work immediately Work) . The CSS and everything else links correctly, so it's not a code issue but a browser/cache issue.

My question is - is there any other way to fix this besides deleting cookies and cache every time something in the css is changed?

P粉536532781
P粉536532781

reply all(2)
P粉590929392

Please add a query parameter with dynamic file modification time to CSS:

" />
P粉520545753

All comments and answers are helpful, but none of them solve the problem in the long term.

After some experiments, I found the answer: disable saving cookies and caching for a given site

Chrome Settings > Advanced > Privacy & Security > Sites that can never use cookies

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template