How to make Varnish ignore a URL's query string for front-end application use
Date Published: March 8, 2022
Scenario
You have a front-end (e.g. Javascript) application that responds on a specific endpoint/URL and reads/writes arguments from the URL for its logic/state. Since the logic is executed on the front-end, you want the page to be served from Varnish (regardless of arguments) as there is no need to make a request to the back-end for each variation of the URL.
For the purposes of this example let's say the endpoint/URL is /myapp
With this URL structure all the above pages would be cached/served as a single entry in Varnish as browsers will not send the URI fragment to the server.
How to make Varnish ignore a URL's query string for front-end application use | Acquia Product Documentation
Cloud Platform
How to make Varnish ignore a URL's query string for front-end application use