This issue produced when i generated the cache in my server (css/js/html), the customer who were logined can not go to the checkout html page but redirect 302 to the cart page by disk cache
The life time of cookie setting is 20 days
my htaccess setting:
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-otf "access plus 1 year"
my cloudflare cdn setting:
Caching Level = standard
Browser Cache TTL = 4hours
This issue made me mad, i wish someone can give me a help.
Thanks a lot.
That being said, you might want to look into the Expires and Cache-Control headers. These currently simply seem to instruct the browser to cache the response.
HI, i chekced in my system log on my server,
i only have:
41.101.69.104 - - [30/May/2020:09:18:00 +0200] “GET /panier HTTP/1.1” 200 15775 “https://maison-des-meches.fr/panier”
and i do not have 302 in acceess log.
so when user request: https://maison-des-meches.fr/commande
i think It is cloudflare give user 302 redirection response whith cache-control: max-age=2592000
but i do not konw why, html page should be no cach allowed.
since cloudfalre give 302 to redirect /panier, so borswer request /panier and my server give 200 for pinaer with cache-control: no cache.
cloudflare give user 302 redirection response whith cache-control: max-age=2592000 Location:https://maison-des-meches.fr/panier
(this request do not rise in my server, but cloudfare send cache-control max-age=2592000 and no cahce allowed, it is strange)
user request: https://maison-des-meches.fr/panier
this request rise in my server, my server reply 200, then cloud fare reply 200 with no-store, no-cache, must-revalidate.
I do not know why the frist request is not remonte in my server…
many thanks, sandro.
i found an way to workaround it, i add an random ccid in the html after the commande
/commande?ccid=123 and my server will always retrun 200
i have an small question if you could help me:
i set Browser Cache TTL = 4hours in cloudfare
and today in my htaccess it is:
ExpiresByType text/css “access plus 1 week”
in myunderstanding, cloudflare will awalys take the longer cache lifetime.
if i set 2 hours in htaccess, cloudflare will take the 4hours as maxage in the reponse
if i keep 1 week in htaccess, cloudflare will take the 1week as maxage in the reponse
Is right?
but today i found the maxage in reponse of http it is 1 month for css. i dnt know this value come from where. It’s beyond me.