# Problem with updating files

**URL:** <https://forum.infinityfree.com/t/problem-with-updating-files/105018>\
**Category:** Hosting Support\
**Created:** [January 27, 2025, 8:02am UTC](https://forum.infinityfree.com/t/problem-with-updating-files/105018 "2025-01-27T08:02:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![lovebug](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/lovebug/32/57624_2.png) [@lovebug](https://forum.infinityfree.com/u/lovebug)\
**Post date:** [January 27, 2025, 9:05am UTC](https://forum.infinityfree.com/t/problem-with-updating-files/105018/4 "2025-01-27T09:05:19Z")

</div>

I have had issues with browsers that continue to cache the old css file even after clearing the cache and possibly you are facing this same issue ?

One solution is to add a version number after the file name that you can increment whenever you make changes as this will force the browser to reload the newly updated css and then cache it again  
something like `mystyle.css` becomes `mystyle.css?0001` `mystyle.css?0002`

On my website I decided to use 1 line of php to append the unix file creation time to my css filename so that everything was automatically updated instead of manually changing the value

> [@fix for stubborn browsers cache and css files](https://forum.infinityfree.com/t/fix-for-stubborn-browsers-cache-and-css-files/41400):
>
> I’ve found that browsers have a habit of keeping CSS files in the cache which is a problem when developing sites. This is also an issue for anyone viewing your site as any changes made to the CSS will not be shown in the viewer’s browser. I have found a way to allow changes to CSS files to instantly update in the browser when a page is loaded or refreshed without the need to clear the cache. This fix uses one line of PHP code and so requires that your page has the .php file extension. This i…

---

_[View the full topic](https://forum.infinityfree.com/t/problem-with-updating-files/105018)._
