Hi, I have a website that will be accessed during a tv show. I’m expecting a peak of traffic during that time. Basically it’s a list of nominees that you can scroll through and during the gala as winners are revealed I update the page to show the nominee as a winner. The one page site is completely cached and static. It uses ajax (jQuery getScript) and calls a js file every 15 seconds. The js updates the winners in the dom if need be. This works perfect but the only problem is that since jQuery needs to use a cache breaking querystring to make sure the browser gets the latest version each time, cloudflare also request a new file each time. Since the file will only update a dozen time during the night and multiple users will load the same script over and over, what I wanted to do is to cache the js file in cloudflare and manually trigger a purge of that script cache whenever I update it.
I created a page rule for that script url with a Cache Level: Ignore Query String but l it seems that the page keeps loading the script with status 200 and ignores my page rule. I tried adding a widlcard at the end of the url where the number is but still doesnt work. The querystring jQuery creates looks like this glo-results.js?_=1615950976744 and then increments each time
I can see on the cache performance page that that the URL is served from the origin server the time. Even if it’s a tiny 721 bytes file I’m worried of the effect that thousands of simultaneous request for that file on the Godaddy server that night might crash it.
Any idea how I could make this work?