Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

How to refresh url with new content?

         

Gemini23

7:10 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have posted this elsewhere but not yet found a solution.
I have a wordpress based website where the content on the homepage changes usually several times a day (niche related news items). BUT... unless either myself or anyone else that revisits the webpage does a manual fresh - we don't see the updated content.

Anyone any suggestions - plugins or otherwise - that would enable a refresh either by visit or by content being modified. This is run on a genesis theme

I have another site that has the standard Wordpress theme and this seems to update automatically.

travelin cat

7:18 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Are you sure that the site isn't being updated? Have you looked at it outside of your network? Any cache plugins?

Gemini23

7:22 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I do have a cache plugin but I also have another website that when I create a new post for example the page gets updated immediately.

travelin cat

7:31 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Turn off the plugin and see what happens. There may be a conflict with one WP install that does not exist on the other.

Gemini23

8:03 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have turned off the plugin and it makes no difference...

travelin cat

8:05 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Have you flushed the cache on your browser?

Gemini23

8:29 pm on Jun 21, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



yes cache flushed...

lucy24

1:17 am on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



unless either myself or anyone else that revisits the webpage does a manual fresh - we don't see the updated content

yes cache flushed...

When you visit the site immediately after emptying your browser cache, do you see the new version or the old version?

If you're seeing the old version, you've got problems.

If you're seeing the new version only if you either empty the cache or refresh manually, you may need to set an expiration header (so that people--that is, browsers belonging to humans--who visit the site have to put in a new request each time, instead of the browser confidently pulling up a cached version). Well, heck, there's probably a plugin for that too. But you should be able to do it yourself.

Gemini23

10:25 am on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I only see the new version if I do a manual refresh.... and this is only really a problem on the homepage...

Re If you're seeing the new version only if you either empty the cache or refresh manually, you may need to set an expiration header (so that people--that is, browsers belonging to humans--who visit the site have to put in a new request each time, instead of the browser confidently pulling up a cached version). Well, heck, there's probably a plugin for that too. But you should be able to do it yourself.

How do I do that?

Gemini23

11:23 am on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is currently in .htaccess
## LEVERAGE BROWSER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## LEVERAGE BROWSER CACHING ##

lucy24

5:57 pm on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ExpiresDefault "access 2 days"

If your content changes more frequently than every two days-- I think you said every few hours-- then clearly you've got to set a shorter time.

:: detour to double-check ::

Yup, you can go right down to seconds. You can even use the keyword "access", meaning "don't cache the page at all", but that may be a little extreme. Maybe 1 hour?

<IfModule mod_expires.c>

To be sure it's working, remove the IfModule envelope. Not its content, just the envelope. If this results in a 500-class error, it means you don't have use of mod_expires and need to try something different. (This is a general truth about IfModule. You either have the mod or you don't, and should code accordingly.)

Gemini23

6:49 pm on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This doesn't seem to make any difference...

I notice that some .htaccess code has ExpiresDefault "access 1 hour" while others have ExpiresDefault "access plus 1 hour"

not sure what the difference is.. (I have tried both)

Gemini23

7:30 pm on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ps.. this seems to be a chrome browser problem as okay in Firefox and IE

Gemini23

7:36 pm on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



the browser caching issue only seems to be on my website...

lucy24

8:43 pm on Jun 22, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



not sure what the difference is.

The word "plus" is optional according to the horse's mouth [httpd.apache.org]. Intuitively, though, it may be easier for the human user (that means you) to follow when you do include "plus".

Jonesy

6:01 pm on Jun 25, 2016 (gmt 0)

10+ Year Member Top Contributors Of The Month



You can not only be having caching problems with browsers; you can be seeing the
effect of caching servers from the web host. To override server caching issues
try adding a (nonsense) (and, unique each time) query string to the URL.
E.g.:
http://example.com/problem.html?x=1

Gemini23

6:25 pm on Jun 25, 2016 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This now seems to have resolved itself.... so not entirely sure where or what the problem was...