Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter sandyalexc

    (@sandyalexc)

    Okay, I have a work-around. I do not think this is an ideal fix, more on that in a minute.

    My .htaccess “out-of-the-box” contained the following

    <IfModule mod_expires.c>
    	ExpiresActive On
    	ExpiresByType image/jpg "access plus 24 hours"
    	ExpiresByType image/jpeg "access plus 24 hours"
    	ExpiresByType image/gif "access plus 24 hours"
    	ExpiresByType image/png "access plus 24 hours"
    	ExpiresByType text/css "access plus 24 hours"
    	ExpiresByType application/pdf "access plus 1 week"
    	ExpiresByType text/javascript "access plus 24 hours"
    	ExpiresByType text/html "access plus 2 Hours"
    	ExpiresByType image/x-icon "access plus 1 year"
    	ExpiresDefault "access plus 24 hours"
    </IfModule>

    I changed the ExpiresbyType for text/html as follows
    ExpiresByType text/html "access plus 0 seconds"

    This worked. BUT – I do not think it is ideal – since in means that no “text/html” browse cache will be used.

    I think an ideal solution would be to allow text/html to cache – and the default of 2 hours makes sense to me. Then, following a logon, send a request formatted so that it cannot be satisfied by cache – so that the reformatted page is returned from the server.

    Any idea how to do that?

    Thread Starter sandyalexc

    (@sandyalexc)

    Hello Dave (@dvaer ), thanks very much for your help – some answers to your questions below – and guess what – I have made some progress in understanding this issue!

    • Yes, if I need to, I will try turning off all plugins.
    • Yes, good idea. What wordpress themes are considered default? I am currently using PressBook. I did experiment with Twenty Twenty-Two – but it was confusing me, so stayed with Pressbook.
    • Yes, thanks, I realized after I submited the origional post that I had experienced a “brain fart” and stated that wrong – 302 is a temp redirect – the response I am seeing is “302 (from disk cache)”
    • Thanks very much for sharing what it should like like! Hmmm, I guess the good news is that is must be something specific I have set, but, I wonder what.
    • Yes – I primarly use Google Chrome – but I have tried this sequence with Microsoft Edge – and I had the exact same result. I may try incognitio mode
    • Not sure how to “re-save permalinks”. I went to the test blog post, changed the permalink, did an update, changed it back, and did an update. Is that what you meant? It did not seem to have any effect
    • Cookie settings are default in both broswsers
    • My .htaccess does contain some interesting stuff. BUT – it all seems to make sense. For instance – a group of ExpiresByType statements within a “<IfModule mod_expires.c>” block. I note that it does appear that ‘ExpiresByType text/html “access plus 2 hours”‘ is in effect – and that makes sense to me. I will see if I can find more info about the Apache config at my service provider if I need to.

      Okay – NEXT – here is what I discovered this morning:

    • Open a Chrome tab, start Developer Tools, as well as selecting “Preserve Logs”, select “Disable Cache”
    • BINGO – when I logon – the blog page is correct – I can reply – I do not need to hit reload
    • Summary

    • This is a browser cache issue.
    • For some reason, the redirect following a login can be satisfied by the browser cache (if browser cache is enabled – which it should be).
    • BUT – following a logoff – something about the request format requires the request to be sent to the server

    My Next steps are to carfully look at the differences between the two requests to see if I can isolate the key differences, and to have a good look at RFC9111 to see if it has any hints.

    I will keep this entry updated.

    Thread Starter sandyalexc

    (@sandyalexc)

    Twomore things:

    • My service provider uses the cPanel interface. I found that there was a “Website Caching” option I could control. I cleared the cache, and disabled caching. I still get the “200 (from disk cache)” response to my itital request for the blog page
    • I ran this grep against my home directory /grep -r “from disk cache”/ – and did not find the string
    Thread Starter sandyalexc

    (@sandyalexc)

    Hmmm, there is still something doing caching. I used Chrome Developer Tools to monitor the traffic

    • When I go the blog URL, the HTTP status returned is “200 (from disk cache)”
    • When I press the reload button, which causes “cache-control: max-age=0” to be included on the request, the HTTP status returned is just “200
    • When I login, the status code when I am sent back to the blog page is “302 (from disk cache)” – and the request headers do not specify “cache-control: max-age=0”
    • When I again press reload, the next request does specify “cache-control: max-age=0” and the response is “200” – no “reason phrase” – so not from disk cache
    • When I select logout, I see the traffic for “wp-login.php?action=logout,&redirect_to=myurl/&_wpnonce=526d5eb935”, followed by the GET for the BLOG page – the request header DOES NOT specify “cache-control” and the response is “200” – I am not sure why it is not a 302 – since it is a redirect – and I am not sure why is does not do a “(from disk cache)”

    I will keep looking – and would really appreciate any ideas.

    Thread Starter sandyalexc

    (@sandyalexc)

    Hi have the following 4 plugins active. They are:

    • Jetpack
    • MailPoet 3
    • OptinMonster
    • WPForms Lite

    Also – your question made me look to see what was creating the wp-content/endurance-page-cache directory – and that lead me to the “Must-use” plugins, where I have the “Endurance Page Cache” plugin Enabled. I used the “purge cache” option (which deleted the wp-content/endurance-page-cache directory), disabled that plug in, and repeated the test. I still see the same behavour – after login – I need to reload the page to see that I have logged on – after loggof – the page is upated to reflect that I am logged off.

    For Jetpack, I have enabled “Enable site accelerator”, and its sub-toption “Speed up image load times”. I have not enabled “Speed up static file load times”.

    As far as I know, the other plugins do not do any caching. As far as I know,

Viewing 5 replies - 1 through 5 (of 5 total)