Skip to content

allowed_query_strings_urls for full measure static caching #1318

@stuartcusackie

Description

@stuartcusackie

I just realised that the allowed_disallowed_query_strings options have no effect with full measure static caching. It presents a problem for me as my site needs to ignore gtm_ referal queries but allow collection pagination queries. I don't understand the technicalities of why these options don't work with nginx, but I wonder if there is a workaround.

In reality I'm never going to be using a Google campaign to link to a paginated url, i.e. it makes no sense for my Google ads to link to mywebsite.com/?page=2. So if the these options will never work for full-measure static caching then I wonder if there could be a new option in the static caching config called allowed_query_strings_urls.

`ignore_query_strings' => true,
'allowed_query_strings_urls' => [
  '/blog'
]

This way GTM query strings would be ignored on all pages, except for the '/blog' page, where I need pagination.

Is this possible or am I missing something? Thanks!

Also, it would be nice to have an additional comment in config/static_caching.php to remind us that the current options are incompatible with full measure.

Related ideas / issues:

#1306
statamic/cms#11142 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions