Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ignore query string for optimal caching
addEventListener('fetch', event => {
async function ignoreQueryString(request) {
let url = new URL(request.url) = ''
let modifiedRequest = new Request(url, request)
return fetch(modifiedRequest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment