I have a website hosted on IIS7 on a windows 10 machine. It is not a website as such, there are just a few PDF files hosted there, and the full URL to them is used in a QR codes. Someone scans a QR code, and the PDF opens to view.
I want to ensure if a PDF is amended, when a user scans a QR code, they will receive the latest version of the file, not a copy cached on their phone etc. The PDF files are menus for a restaurant.
I have tried using the output caching option, which creates the web.config file, with the below in it:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<caching>
<profiles>
<add extension=".pdf" policy="DisableCache" kernelCachePolicy="DisableCache" />
</profiles>
</caching>
</system.webServer>
</configuration>
Once this is there, the server gives an internal server error when visiting the URL. Deleting the web.config file restores service.
Do PDF files even get cached?
What is wrong with the web.config file the IIS Server Manager creates when using the "output caching" option?
Thanks :-)