My website seems to use the old CSS. The website is simastroposisi.infinityfreeapp.com. The problem happened just about hours ago; all was fine before.
The Problem
Here are some examples of the problem in the homepage.
- All figures should have border, with small font.
- The text on the footer in the lower-right corner should be white white small-radius text-shadow.
There are problems in the other pages, too, still related to CSS, but the samples from the homepage is adequate to illustrate the situation.
The Files
The styling for the above cases are present in the CSS as the most recent addition.
The Testing
With local server, there is no problem; the styles are properly applied. With wifi from my ISP, the problem happened, and so does with mobile network. I guess this means the problem doesn’t come from network cache.
Other contents and styles other than the latest addition to CSS work fine.
Summary
Of 990 lines of style definition in the CSS, only 937 lines are applied. The situation happened only hours ago. I’m guessing it’s some kind of server cache, if any, pulling the old version of the CSS instead of the latest.
Any idea for the solution? Thanks in advance.
did you try to clear your browsers cache from settings? Because it wont apply new css directly because browser is using the old stored one but if you try to clear cache maybe you can see the new css
Yep, I’ve done it, from laptop and phone browser, still didn’t solve the problem.
It’s all static though, only HTML, CSS, and JS + JQuery. Or is there some config files in the htdocs folder parent?
I’ve found the workaround. I made a copy of the original CSS, renamed it, and changed the HTMLs to refer to the new (identical, but different name) CSS. It works.
The problem still happen though, the original CSS still wrongly applied, but final-display-wise, all is fine, now.
Thank you, all.
The only thing that causes this is Browser cache; so you cannot have cleared it otherwise it would work.
Sometimes it takes a couple mins for the cache to update, so just be patient after you cleared it.
2 Likes
That’s definitely your browser’s cache.
Next time you make changes to your CSS try linking it in the HTML like this:
<link rel="stylesheet" href="assets/css/salinan-style-utama.css?v=1" />
If you increment the value of v=1
to v=2
, for example, every time you make a new change the browser thinks it’s a new file and downloads it again instead of using the cached version.
4 Likes
Ah, nice info, thanks a lot, will do the version control.