So I have a file sharing site, with URLs that are in the form of, for example:
The first visit from a specific IP address within an hour will present the download information page which contains filename, size, and more importantly, the ads that fund the site. The actual download button goes to the same URL as above, except this time, because the IP already exists, will trigger a download of the file.
My question is - how can I tell CloudFlare to cache the file transfer, but not the initial page request? Because it’s the same URL, if I use normal Cache-Control then it would look the same.
Could I use ETags here (different ones for the download page vs download file)?
What’s the recommended best practice for this kind of setup?