Autopurge homepage
-
Hi,
my homepage will not update and show the newly published post unless I reload the browser manually. I have tried with different purge settings, including “All”.
My theme uses regular WordPress structure, there is no extra page used as homepage.
My report number: CYCFUSUJAny help is appreciated
The page I need help with: [log in to see the link]
-
Hi,
Could you please specify what do you mean by ” unless I reload the browser manually” , what do you refer to by “reload the browser “?
Best regards,
What I mean is that a returning visitor will never see the new articles on the front-page. It will always show the same page with the old articles and not the new ones that have been published since the first visit.
Hi,
Please do a test
1. on your browser, press F12 , you will see a small windows pop out , the developer tool , there is a “network” tab.
2. now access your homepage , you will see, as this screenshot.
there is a “x-litespeed-cache: hit”
3. now publish a new post
4. go back to your home page , press CTRL + SHIFT + R to hard refresh the page , now please check , then:
do you still see “x-litespeed-cache: hit” or it becomes other value ?
do you see new content published ?Best regards,
Hi,
well that is exactly the problem. Only when I hard refresh the page, I will see the new content. My newly published posts appears if I hard-refresh.
Let’s say I worked in firefox browser and publish the post, logout of WordPress, I will see the new post.
If I now check e.g. in Safari, the new post will NOT appear unless I hard refresh the homepage.
When I use another cache plugin (e.g. wp rocket) returning users used to see the newly published post without hard-refreshing. It seems like Litespeed cache will always serve the homepage from last user’s browser cache unless explicitly refreshing the webpage. How are users supposed to see the new content?- This reply was modified 5 years, 6 months ago by mrmad.
Hi,
I think I have found where the issue is coming from , but need you to confirm me that did you see “x-litespeed-cache: miss” or “x-litespeed-cache: hit” after hard refresh ?
Best regards,
It was a hit…
Hi,
OK, now that breaks my theory ….
Please do this:
1. find your IP , you can get it here https://www.whatsmyip.org/
2. go to LSCWP, debug tab , set debug log to admin IP with your IP , and also choose log level to “advance”
3. go to post publish page , write some content , but don’t publish it yet.
4. go to debug page on left-side-menu inside LSCWP
5. purge all
6. access your home page twice , and make sure you see “x-litespeed-cache: hit” header
7. now publish the post.
8. provide the debug log , it will be long log , you can put it here https://gist.github.com/ and share the link.
Best regards,
When I published the article now I saw: cache miss, cache control: private.
I am unable to download the log file at the moment- I will include it as soon as possible.Here is the log: https://gist.github.com/mrmad/3a729867ddc2a50eb1dce5acb98c95c4
An update would be nice…
Hi,
Apologize for late response
from log , I can see
X-LiteSpeed-Purge: public,2e1_
at 05/22/19 15:22:00.092 , which is purge all call.I noticed from your homepage, there is an HTTP header
cache-control: public, max-age=86400
this is what tells browser to cache the page , could you please get rid of this cache header and try again ?
Can you tell me how to? I am using default settings. Is it because of the favicon? Can you check my .htaccess?
`# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* – [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) – [E=cache-control:no-vary]### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php – [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###### marker FAVICON start ###
RewriteRule favicon\.ico$ – [E=cache-control:max-age=86400]
### marker FAVICON end ###### marker WEBP start ###
RewriteCond %{HTTP_ACCEPT} “image/webp” [or]
RewriteCond %{HTTP_USER_AGENT} “Page Speed”
RewriteRule .* – [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
### marker WEBP end ###</IfModule>
## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ##### LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
# END NON_LSCACHE
# SetEnv MAGICK_THREAD_LIMIT 1
RewriteRule .* – [E=Cache-Vary:euCookie]
CacheKeyModify -qs:utm_medium
<IfModule Litespeed>
RewriteEngine On
RewriteRule (wp-cron)\.php – [E=noconntimeout:1]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
Hi,
No , I don’t think it’s come from .htaccess, but please try remove all other rules and leave only the WP default block , and see how it goes.
Do you have any other optimize-like plugin in your site ?
Because WP default doesn’t send out that public max-age 86400 header.
Best regards,
I don’t really know where this is coming from. I don’t have any optimization plugins other than ls cache plugin. I am using Plesk with ls cache add-on.
When I disable LSCache plugin, I still see :
cache-control: public, max-age=86400Hi,
Then please try this way:
set up a new WP site in a sub-directory and see if you still got that header, if so , then it’s probably something wrong in your server configuration.
If not , then it must be coming from one of your plugins.
Best regards,
- The topic ‘Autopurge homepage’ is closed to new replies.