For my website Google PageSpeed Insights recommends to change expiration values for some cacheable resources like .css, .js,.svg ,google api ,siteimprove .Is it feasible to set the expiration values for the above files? If yes,then what configuration will be required for that?
Asked
Active
Viewed 1,165 times
4
-
3Have you seen this question - http://stackoverflow.com/questions/21074198/leverage-browser-caching-in-iis-google-pagespeed-issue – Wesley Lomax Dec 08 '15 at 09:08
1 Answers
5
Enabling browser caching for these items is not something which normally relates directly to Sitecore as they are typically static files within your webroot, not served by Sitecore. This question How to configure static content cache per folder and extension in IIS7? should help you with configuring the folders in your webroot to have the correct cache headers.
Tip: these changes would be applied to the web.config file and I would suggest using web.config transforms to apply those changes to the web.config rather than modifying it directly.

Community
- 1
- 1

Matthew Dresser
- 11,273
- 11
- 76
- 120
-
Google PageSpeed Insights has also recommended to change expiration values for below two urls : http://maps.googleapis.com/itializeMaps&HHSGSHSU.. (30 minutes) http://ssl.siteimprove.com/js/xyz.js (2 hours) Is it possible to change the expiration values for the above two urls ? – Babita Dec 09 '15 at 06:53
-
1As those resources are served from domains external unto your site I doubt you could do anything about them. FYI I wouldn't necessarily try to fix every single google page speed suggestion - aim for the 'low hanging fruit' first! – Matthew Dresser Dec 09 '15 at 07:46