FastFPC
FastFPC copied to clipboard
Remove all marketing get parameters to minimize the cache objects
Marketing query parameter like gclid should not be respected in cache-key.
Varnish equivalent:
set req.url = regsuball(req.url, "(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=[-_A-z0-9+()%.]+&?", "");
set req.url = regsub(req.url, "[?|&]+$", "");
good idea
Marketing query parameter like
gclidshould not be respected in cache-key.Varnish equivalent:
set req.url = regsuball(req.url, "(gclid|cx|ie|cof|siteurl|zanpid|origin|fbclid|mc_[a-z]+|utm_[a-z]+|_bta_[a-z]+)=[-_A-z0-9+()%.]+&?", ""); set req.url = regsub(req.url, "[?|&]+$", "");
Could you please translate what this regsuball and regsub does ?
@Genaker I have not invented these two lines, its copied from magento varnish config file.
Basically, line 1 removes tracking query parameters including their corresponding value
Line 2 removes ? or & from the end of the URL
Oh nice. This one is better explaining. Also get parameters must be ordered.
On Tue, Aug 22, 2023 at 1:19 AM p24-max @.***> wrote:
@Genaker https://github.com/Genaker I have not invented these two lines, its copied from magento varnish config file. Basically, line 1 removed tracking query parameters including their corresponding value Line 2 removes ? or & from the end of the URL
— Reply to this email directly, view it on GitHub https://github.com/Genaker/FastFPC/issues/1#issuecomment-1687706182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGJNZT4E4N3A6YL565APODXWRTSLANCNFSM6AAAAAAZAKVFYE . You are receiving this because you were mentioned.Message ID: @.***>