My webpage ignores changes in CSS file
Posted
by
Pavel
on Stack Overflow
See other posts from Stack Overflow
or by Pavel
Published on 2013-06-26T11:18:46Z
Indexed on
2013/06/26
22:21 UTC
Read the original article
Hit count: 138
css
No matter what I change in my .css file, the page remains the same - what's more, neither changing the link tag so that it points to another .css file nor deleting it completely makes no difference. Other changes in html code are applied. The sourcecode of the webpage shows everything as it should be. This behavior started when I redirected the link tag from previous file to the one I use now (plus there have been some changes in the tag while this problem occured, to test the behavior of my webpage); changes in neither file affect the page.
For the first time when this happened, this was caused by copies of head tag in included chunks of code (for header, left menu etc. - their head part overrode the head part of the main page) and the problem was solved by removing these redundant heads from these files. But it happened again when I changed the link tag for the next time. I couldn't find any head parts in my included files, but the problem lasts (only solution I can see now is to delete the included files and copy the code directly to the file, but this would mean lots of redundant code).
How can I solve this problem, so that my page response to changes in .css files without increasing redundancy? How to ensure that I can change the link to .css file just on one place with no such problems?
Do I have to unload the CSS file somehow?
I saw this problem both in Firefox and in Chrome. I use PSPad to write the code, just in case it would play role.
EDIT: I have cleared browser cache now, and I changed the link to .css files from one to another before, but nothing helped. Now I accept the best answer saying the problem is in caching and I start a related question to find out how to solve the caching issue. If the other question's answers would say that in this case I can be sure that problem isn't in caching (very unlikely, but fail of ordinary methods of caching-problems-solving is unlikely too), I'd update this question and start searching for other possible problems, but now the message seems to be clear: when webpage ignores changes in .css files, caching is to blame.
© Stack Overflow or respective owner