|
15 | 15 | <add enabled="true" mimeType="message/*"/> |
16 | 16 | <add enabled="true" mimeType="application/javascript"/> |
17 | 17 | <add enabled="true" mimeType="application/json"/> |
| 18 | + <add enabled="true" mimeType="image/svg+xml"/> |
18 | 19 | <add enabled="false" mimeType="*/*"/> |
19 | 20 | </staticTypes> |
20 | 21 | </httpCompression> |
|
31 | 32 | <rule name="Angular Root Redirect" enabled="true" stopProcessing="true"> |
32 | 33 | <match url="^/?$" /> |
33 | 34 | <action type="Redirect" url="/products/ignite-ui-angular/getting-started" redirectType="Permanent" /> |
34 | | - </rule> |
| 35 | + </rule> |
35 | 36 | </rules> |
| 37 | + <outboundRules> |
| 38 | + <rule name="Cache immutable files" preCondition="IsImmutable"> |
| 39 | + <match serverVariable="RESPONSE_Cache-Control" pattern=".*" /> |
| 40 | + <action type="Rewrite" value="public, max-age=31536000, immutable" /> |
| 41 | + </rule> |
| 42 | + <preConditions> |
| 43 | + <preCondition name="IsImmutable" logicalGrouping="MatchAny"> |
| 44 | + <add input="{REQUEST_URI}" pattern="styles-.*\.css$" /> |
| 45 | + <add input="{REQUEST_URI}" pattern="chunk-.*\.js$" /> |
| 46 | + <add input="{REQUEST_URI}" pattern="main-.*\.js$" /> |
| 47 | + <add input="{REQUEST_URI}" pattern="polyfills-.*\.js$" /> |
| 48 | + <add input="{REQUEST_URI}" pattern="/media/.*" /> |
| 49 | + </preCondition> |
| 50 | + </preConditions> |
| 51 | + </outboundRules> |
36 | 52 | </rewrite> |
37 | 53 | <staticContent> |
38 | | - <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> |
| 54 | + <!-- 1 hour public cache for regular static assets --> |
| 55 | + <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.01:00:00" cacheControlCustom="public" /> |
| 56 | + |
39 | 57 | <remove fileExtension=".json" /> |
40 | 58 | <remove fileExtension=".csv" /> |
41 | 59 | <remove fileExtension=".shp" /> |
|
56 | 74 | </customHeaders> |
57 | 75 | </httpProtocol> |
58 | 76 | </system.webServer> |
| 77 | +<location path="index.html"> |
| 78 | + <system.webServer> |
| 79 | + <staticContent> |
| 80 | + <!-- Short-lived cache for index.html --> |
| 81 | + <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.00:05:00" cacheControlCustom="public" /> |
| 82 | + </staticContent> |
| 83 | + </system.webServer> |
| 84 | +</location> |
59 | 85 | </configuration> |
0 commit comments