Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-05-11 23:05:18

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Design changes cannot be visible by simple F5.

I encounter a strange thing: every time I change something within stylesheet of my template, I need to close and open again the incognito mode in web-browser to notice the changes. Otherwise a simple F5 to refresh the site does not work. I tried to disable cookies in web-browser, but it didn’t help.

I am not sure what may be the cause of the problem, I apologize in advance if it has nothing to do with TextPattern.

Offline

#2 2020-05-11 23:12:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,328
Website

Re: Design changes cannot be visible by simple F5.

Sometimes pages can be aggressively cached by servers. Does the situation improve if you flick the Send “Last-Modified” header? to ‘No’ in Admin->Prefs->Publish?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2020-05-11 23:24:51

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Re: Design changes cannot be visible by simple F5.

Unfortunately it doesn’t help. Is there anything I could do to fix that?

Offline

#4 2020-05-11 23:45:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,328
Website

Re: Design changes cannot be visible by simple F5.

Presumably you don’t have any caching plugins installed? etc_cache, aks_header, …


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2020-05-11 23:49:56

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Re: Design changes cannot be visible by simple F5.

Just fresh installation of TextPattern via “Softaculous Apps Installer”.

Offline

#6 2020-05-12 00:21:30

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Re: Design changes cannot be visible by simple F5.

I’ve found this advice and will try…: https://support.tigertech.net/prevent-caching

Offline

#7 2020-05-12 00:31:12

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Re: Design changes cannot be visible by simple F5.

Did not help :(

Offline

#8 2020-05-12 00:36:12

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Re: Design changes cannot be visible by simple F5.

What a surprise. I’ve found that in Chrome and Chromium-based browsers You can reload webpages, ignoring cached content – by Shift+F5. It helps in case of CSS changes within TextPattern and, I suppose, other websites as well.

Offline

#9 2020-05-12 01:40:05

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,981
Website

Re: Design changes cannot be visible by simple F5.

ThomasLeigh wrote #322933:

What a surprise. I’ve found that in Chrome and Chromium-based browsers You can reload webpages, ignoring cached content – by Shift+F5. It helps in case of CSS changes within TextPattern and, I suppose, other websites as well.

Yes. Modern browsers are more and more aggressive when it comes to resource caching (JS, CSS, images…). Force-reloading (which is what your short cut does for Chromium based browsers) is often necessary. The developper tools of your browser (at least Safari and Firefox, no idea about Chromium) have a setting for reloading from server always – while that tools window is open.

Adding the following to the .htaccess helps me for the specified file types (for iOS also !):

 <FilesMatch "\.(css|js|svg)$">
    Header append Cache-Control "max-age=0"
</FilesMatch>

you can add other filetypes in the list as needed. That is a bit tricky to do on a liver server though, as it affects all and every visitor.

Offline

#10 2020-05-12 13:56:28

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 20

Re: Design changes cannot be visible by simple F5.

@phiw13

> Modern browsers are more and more aggressive when it comes to resource caching (JS, CSS, images…).

I am surprised because I remember that some time ago it hasn’t been that way, hasn’t?

> The developper tools of your browser (at least Safari and Firefox, no idea about Chromium) have a setting for reloading from server always – while that tools window is open.

Thank You for pointing this out, perhaps this is the best solution for me since “FilesMatch” in my case does not work :( (I’ve tried both with css and php, TextPattern-wise). Chromium fortunately also has this feature: DevTools › settings › Network › Disable cache (while DevTools is open). So with this one does not have to use Shift+F5 :) .

Offline

Board footer

Powered by FluxBB