Caching of CSS files

Sometimes when I deploy my app to firebase the design is not updated (change color of something) or the layout is wrong (positioning) and different from when I check the responsive settings in the editor.

Unfortunately I can’t share a screenshot because I would like to keep my design private.

Is anyone else here using firebase and have noticed the same? or does anyone know a possible reason for this.

If these styles are within the style sheet itself you may require to clear any cache before changes will be reflected. Try temporarily renaming the style sheet if this is the case to see if it reflects your changes first…?

1 Like

Thank you Dave I will try that & yes the styles are from classes in the stylesheet.

1 Like

No problem I’ve renamed many times rather than keep hitting the caching servers, CloudFlare, etc. Quick way to view the changes then let the caching catch up with the new styles.

1 Like

Reason why I have asked to enable versions of the file to be included in Wappler

e.g. mystyles.css?v=1.0

2 Likes

It would also be useful if the version string could be dynamic. Easily done with a little PHP, but Wappler overwrites this by incorrectly encoding the PHP. I would be happy with this solution, once the bug has been fixed.

1 Like

Is there a feature request for versioning of files Ben?

1 Like

No, there is not Neil. I have only mentioned it in various topics with the hope that the hint would stick.

1 Like

If you made a Feature Request of it then I would vote for it. It would then be on their ‘To Do’ list :smile:

Make sure you clearly explain the case for having it so it will get the votes needed.

1 Like

That would be a fabulous feature @ben.

@fdgfdgfdg, I do all my testing using the browser in incognito mode, where there is less caching goes on so you get your css files etc re-loaded pretty well most of the time when you hit page refresh.

2 Likes

I use this extension for Chrome, clears the cache in one click.

2 Likes

For dev, I keep browser devtools always open which has an option to always ignore the cache.

6 Likes

I'm doing the same :slight_smile:

2 Likes

Thanks for that input folks!

So I have been wondering about all of this from the point of view of users getting an updated CSS file.

Is the method @ben talks about the only way to do this?

1 Like

Pretty much, unless you’re using a cdn that supports flushing/purging the cache to deliver your stylesheet

1 Like

Fastly supports this.

1 Like