MyBB Community Forums
Client side cache - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Client side cache (/thread-227489.html)



Client side cache - Vitor - 2020-04-26

Is there a way to clear the cache on the client side?
When I make changes to the CSS, it is not updated instantly on the client side.

For example, I changed the background color and asked my friend (who was logged in to the forum) to update the page, but the changes were not updated. He had to open an anonymous tab to see the updates.


RE: Client side cache - Ben - 2020-04-26

It is likely easier to ask your friend to hard refresh the page (CTRL + F5) a few times to see the changes.


RE: Client side cache - Darth Apple - 2020-04-26

We just rename the stylesheet every time there are any major changes. (e.g. global.css becomes global2.css). Doing this forces the client side browser to reload that stylesheet.

This doesn't work for images, but it will work for CSS and templates.


RE: Client side cache - Nasyr - 2020-04-26

(2020-04-26, 09:46 PM)Ben Wrote: It is likely easier to ask your friend to hard refresh the page (CTRL + F5) a few times to see the changes.

This is the best solution supposing there is very limited users on the forums (newly created).

(2020-04-26, 09:49 PM)Darth Apple Wrote: We just rename the stylesheet every time there are any major changes. (e.g. global.css becomes global2.css). Doing this forces the client side browser to reload that stylesheet.

This doesn't work for images, but it will work for CSS and templates.

This is the best practice to ensure there isn't any issues going forward. I recommend following this.