0

I have a set of css files, some file names ends with a number and some without number. Both of the files are in the same folder, say css folder. I cannot move that to different folders. I want to add cache-control to all the files that ends with a number. I tried to add the below in the web.config, but as you know it is applicable to all the files in the folder. Is there a way to apply to only the file names that ends with a number? Or any other solution to achieve this?

<location path="css folder">
    <system.webServer>
      <staticContent>
        <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
      </staticContent>
    </system.webServer>
  </location>
Ema
  • 12
  • 3
  • Does this answer your question? [How do I disable caching of an individual file in IIS 7 using weserver config settings](https://stackoverflow.com/questions/3929284/how-do-i-disable-caching-of-an-individual-file-in-iis-7-using-weserver-config-se) – Joe Aug 08 '21 at 07:54

0 Answers0