-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static files are treated as dynamic content and therefore not served from cache #2
Comments
Thx for the fast reponse! I did some extra digging and found out that my static files are not identified as static at all. The request: |
IIS static content compression may only be used for frequently accessed files. |
I now partially solved this issue by pre-compressing (Gzip & Brotli) all my static files on build with some Gulp tasks and use the nuget package CompressedStaticFiles to serve these pre-compressed static files. For the dynamic content compression i still use this extension. |
adding a rewrite rule to strip the query string works around the issue, e.g.
|
IIS on Azure is either not caching the crompessed static files after a request or it is not serving them from the cached location on subsequent requests. I have tryed to set the "directory" tag with the most common value in the applicationHost.xdt but that did not work.
Old:
<httpCompression>
New:
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
The text was updated successfully, but these errors were encountered: