Download the PHP package fdmind/ignore-query-strings without Composer
On this page you can find all versions of the php package fdmind/ignore-query-strings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fdmind/ignore-query-strings
More information about fdmind/ignore-query-strings
Files in fdmind/ignore-query-strings
Package ignore-query-strings
Short Description If your website has static caching on, and you drive traffic to it from social media, Google Ads and other sources that add query string parameters to the URL, there is a chance that each time new user visits a page, it will not be served from cache, but will be generated from scratch. This is because the URL with query string parameters is treated as a different URL from the one without query string parameters.
License MIT
Homepage https://github.com/4dmind/ignore-query-strings.git
Informations about the package ignore-query-strings
Ignore Query String Parameters
If your website has static caching on, and you drive traffic to it from social media, Google Ads and other sources that add query string parameters to the URL, there is a chance that each time new user visits a page, it will not be served from cache, but will be generated from scratch. This is because the URL with query string parameters is treated as a different URL from the one without query string parameters.
You could always set 'ignore_query_strings' => true
, but that would mean that you would not be able to use query string parameters in your templates.
This addon allows to have both: ignore query string parameters for caching purposes, but still be able to use them in your templates.
DISCLAIMER: Addon will not work if you have full static caching on and Nginx rules set up to serve static html files directly.
How to Install
You can search for this addon in the Tools > Addons
section of the Statamic control panel and click install, or run the following command from your project root:
How to Use
Addon comes with ignore-query-strings.php
config file, where you can specify which query string parameters Statamic should allow or deny. By default, it is set to allow only most popular parameters, but you can remove and add your own.