color changes to style don't show until users clear browser cache

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Suggested Hosts
Locked
vegastechshows
Registered User
Posts: 22
Joined: Sat Apr 06, 2013 3:57 pm

color changes to style don't show until users clear browser cache

Post by vegastechshows » Tue Dec 02, 2014 12:21 pm

I recently changed some colors in my default prosilver style (css file modifications)
They didn't show up for me until I cleared that cache in all of my browsers on all of my computers.
I want the changes to show up for all of my visitors.
How can I signal to browsers (via my template files or php files) to purge their cache so they can see my updated style colors.
Thanks

User avatar
Lumpy Burgertushie
Registered User
Posts: 66732
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: color changes to style don't show until users clear browser cache

Post by Lumpy Burgertushie » Tue Dec 02, 2014 2:01 pm

if you purge your cache then the changes are available. if a member comes back later and reload any page it should refresh their cache in their browser so it won't really be a problem.

if you want to be able to see your changes instantly:

Tools needed to set up and customise phpBB
Can't see changes editing styles? Changes have disappeared?

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

techman41973
Registered User
Posts: 410
Joined: Thu Mar 28, 2013 10:27 pm

Re: color changes to style don't show until users clear browser cache

Post by techman41973 » Tue Dec 02, 2014 8:07 pm

Appreciate these other insights. However I still don't understand why after I refresh my style theme in the ACP and clear the PHPBB cache,
I still can't see styling changes (color updates etc) *until* I clear the browser cache also.
Which again concerns me, because my visitors aren't clearing their browser cache and most won't see my style color updates

User avatar
Lumpy Burgertushie
Registered User
Posts: 66732
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: color changes to style don't show until users clear browser cache

Post by Lumpy Burgertushie » Tue Dec 02, 2014 8:09 pm

this really has nothing to do with phpbb. this is standard browser behaviour. you changes will show to other people on other computers just fine. If you are concerned, post a message telling people to refresh their browser if they can't see the changes but I have never heard of this being a problem for others before.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51867
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: color changes to style don't show until users clear browser cache

Post by Brf » Tue Dec 02, 2014 8:14 pm

Webbrowsers typically cache stylesheets if they can. This is especially true with the Prosilver stylesheet, which is created by style.php. Since style.php's timestamp has not changed, your webbrowser does not know there has been a change,

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: color changes to style don't show until users clear browser cache

Post by Arty » Tue Dec 02, 2014 10:30 pm

Brf wrote:Webbrowsers typically cache stylesheets if they can. This is especially true with the Prosilver stylesheet, which is created by style.php. Since style.php's timestamp has not changed, your webbrowser does not know there has been a change,
That is not entirely correct. style.php is an executable file, its time stamp is irrelevant. When browser sends IF_MODIFIED_SINCE header to check if file has been modified, PHP still executes script. Its up to script to check for that HTTP header.

However, style.php sends expiration date http header that causes problem. It tells browser to cache stylesheet for 7 days, so browser doesn't even bother checking if stylesheet has been updated because forum told it to keep cache for 7 days. style.php sends that header only if theme hasn't been changed in last 30 minutes.

Its weird behavior and something that is gone from phpBB 3.1 :)

Best way to deal with that is to enable option "recompile stale style components". You can find it in admin control panel -> load settings. Enable it before performing any edits to any style components, disable it after you've done editing and made sure all changes work. It will remove need to purge phpBB cache after each template or theme edit.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51867
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: color changes to style don't show until users clear browser cache

Post by Brf » Wed Dec 03, 2014 12:19 am

Will that help the users who did not visit during the time the recompile setting was on?
Thanks for the explanation on the 7-day expiration. I knew the problem was the executable-ness of style.php, but did not know why browsers cached the old output.

techman41973
Registered User
Posts: 410
Joined: Thu Mar 28, 2013 10:27 pm

Re: color changes to style don't show until users clear browser cache

Post by techman41973 » Wed Dec 03, 2014 5:50 am

So basically this issue goes away in 7-days in which visitors who return will then get the new stylesheet... correct? Thanks for all these insights.

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Re: color changes to style don't show until users clear browser cache

Post by Arty » Wed Dec 03, 2014 8:52 am

Brf wrote:Will that help the users who did not visit during the time the recompile setting was on?
Unfortunately no, but it will help users who visited during development.
techman41973 wrote:So basically this issue goes away in 7-days in which visitors who return will then get the new stylesheet... correct? Thanks for all these insights.
Yes. Another solution is to simply rename style. Uninstall it, change directory name, install again.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Locked

Return to “[3.0.x] Styles Support & Discussion”