• Resolved motor4ikk

    (@motor4ikk)


    does not return back, the same page is loaded. When I go to my site, then in the store category, I load some product, after I press the back button, the page simply reloads and shows the same page, if I press the back button again, the browser returns 2 steps back. The problem is observed only with the inclusion of the plugin

    I suggest watching the video of the problem.
    Sorry for my bad english.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support qtwrk

    (@qtwrk)

    vimeo seems doesn’t want to play it to me , please upload it to somewhere like google drive or such

    what was the browser? tested on Chrome and “back” works on me

    This server is misconfigured. Using browser cache for the main document can’t work.

    cache-control: public, max-age=86400,private, must-revalidate

    Thread Starter motor4ikk

    (@motor4ikk)

    https://drive.google.com/file/d/1E_1FxPkFzQMbjFBStGhFwHntJjteeeTu/view?usp=sharing
    Here is the link to the video. The problem now is that if you go to the site for the first time, go to a category to open a product, it returns perfectly. But if you go to the same product again, you can’t go back. Maybe someone can help solve the problem. The problem occurs in chrome, both on PC and on mobile.

    Plugin Support qtwrk

    (@qtwrk)

    as @serpentdriver stated

    please remove that cache-control header over your page, it must be cache-control: no-cache, max-age=0, must-revalidate so the browser will fetch page again from server, otherwise it will load directly from browser cache

    Thread Starter motor4ikk

    (@motor4ikk)

    Found the problem. The problem is not in the cache, the problem occurs when the Google ads tag is active on the site.

    Your server is still misconfigured. You use browser cache for the main document, so it is a cache problem, but not the cache from the plugin. You have strange settings defined in your .htaccess that prevents cache plugin from working correctly.

    Thread Starter motor4ikk

    (@motor4ikk)

    But I have this file only with edits made by Litespee. If I delete everything from the .htaccess file, leaving it standard as in WordPress, then everything works with the Google ads, but when I turn on the browser cache in litespeed, everything takes off again, here is mine:

    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 \.litespeed_conf\.dat - [F,L]
    
    ### marker MOBILE start ###
    RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile]
    ### marker MOBILE end ###
    
    ### marker NOCACHE COOKIES start ###
    RewriteCond %{HTTP_COOKIE} woocommerce_cart_hash
    RewriteRule .* - [E=Cache-Control:no-cache]
    ### marker NOCACHE COOKIES end ###
    
    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
    ### marker FAVICON end ###
    
    ### marker DROPQS start ###
    CacheKeyModify -qs:fbclid
    CacheKeyModify -qs:gclid
    CacheKeyModify -qs:utm*
    CacheKeyModify -qs:_ga
    ### marker DROPQS 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 BROWSER CACHE start ###
    <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresByType application/pdf A2592000
    ExpiresByType image/x-icon A2592000
    ExpiresByType image/vnd.microsoft.icon A2592000
    ExpiresByType image/svg+xml A2592000
    
    ExpiresByType image/jpg A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/png A2592000
    ExpiresByType image/gif A2592000
    ExpiresByType image/webp A2592000
    
    ExpiresByType video/ogg A2592000
    ExpiresByType audio/ogg A2592000
    ExpiresByType video/mp4 A2592000
    ExpiresByType video/webm A2592000
    
    ExpiresByType text/css A2592000
    ExpiresByType text/javascript A2592000
    ExpiresByType application/javascript A2592000
    ExpiresByType application/x-javascript A2592000
    
    ExpiresByType application/x-font-ttf A2592000
    ExpiresByType application/x-font-woff A2592000
    ExpiresByType application/font-woff A2592000
    ExpiresByType application/font-woff2 A2592000
    ExpiresByType application/vnd.ms-fontobject A2592000
    ExpiresByType font/ttf A2592000
    ExpiresByType font/otf A2592000
    ExpiresByType font/woff A2592000
    ExpiresByType font/woff2 A2592000
    
    </IfModule>
    ### marker BROWSER CACHE end ###
    
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    # END NON_LSCACHE
    # BEGIN WordPress
    
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress

    Again, you have wrong defined caching for browser cache. This has nothing to do with cache plugin. Check your settings at Cloudflare and search for “cache-control”.

    This is your wrong setting (at Cloudflare):

    cache-control: public, max-age=86400,private, must-revalidate

    but has to be:

    cache-control: private,max-age=0,no-cache,no-store,must-revalidate

    • This reply was modified 2 years, 3 months ago by serpentdriver.
    Thread Starter motor4ikk

    (@motor4ikk)

    When I clear.htaccessonly leave:

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress

    . Then everything works, but the litespeed cache doesn’t work either, so the problem is not cloudflare

    Nobody said that you should clean .htaccess! If you remove cache plugin rules from .htaccess it is no wunder that it doesn’t work anymore.

    If you don’t check the settings in CF nobody can help you! Your issue isn’t caused by the cache plugin because this plugin doesn’t set such horrible wrong browser caching because this plugin controls server caching and not browser caching for dynamic sources. Therefore you must change cache-control settings for dynamic sources in CF.

    Thread Starter motor4ikk

    (@motor4ikk)

    I checked in cloudflare, it does not cache html

    Do you have any other cache plugin installed?

    Thread Starter motor4ikk

    (@motor4ikk)

    Instaled only litespeed
    Problem solved, thanks everyone for your help. I set in .htaccess manually not to cache dynamic files in the browser.

    <filesMatch ".(php|cgi|pl|htm)$">
    ExpiresDefault A0
    Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
    Header set Pragma "no-cache"
    </filesMatch>
    • This reply was modified 2 years, 3 months ago by motor4ikk.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘does not return back, the same page is loaded.’ is closed to new replies.