My page CSS and JS files are not updating

Username epiz_26164115



Basically, since yesterday my website is not updating correctly and is acting really weird. I have some CSS and JS files that are not being updated anymore and have old functions, etc. I have tried ctrl-F5, and even clearing my browser cache. But even on my phone is using the old CSS and js.

The weird thing is that I go inside the file manager and edit the files and they are fine. I have my JS file which I erased a function; however, when I open the page I get a JS error for that function that is not existent anymore.

I tried deleting everything from the page and I reload the page and it updates, but when I upload the files again it still shows the wrong CSS and JS and the JS function is still there, which seems really impossible to me…

Other Information

It can be noticed how my contact section at the end of the page shows the updates in my HTML, but the corresponding classes for that section do not show on the CSS, which works fine locally for me.

I see your site using Cloudflare nameserver.
Have you turn on cache feature on Cloudflare dashboard?
If you turn on that feature & you update your files (JS/CSS), you must purge them on the dashboard.


And enabling “Development Mode” makes your site bypass CF Cache Temporerely.


Thank you so much! It worked.

1 Like

Thank you to you too for letting me know there is that option available!

1 Like

Glad it worked :smile:

Another method I use on my site which helps a lot is using PHP to fetch a new version of the file each time the page loads, eg:

<link rel="stylesheet" href="/libs/assets/css/main.css?ver=<?php echo Date('dsimhY'); ?>" />
The PHP echos a unique number based on the time & date. The ?ver= is what tells the server which version of the file to fetch.

You will end up with a long number like this after the file link that changes every time the page loads.

 <link rel="stylesheet" href="/libs/assets/css/main.css?ver=29115207122020](" />
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.