There's a common issue while optimizing Google PageSpeed insights score. The thing is that https://www.google-analytics.com/analytics.js is delivered with cache-control:public, max-age=7200 header which is only 2 hours. Though, recommended value is at least 1 week (https://developers.google.com/speed/docs/insights/LeverageBrowserCaching), so to get rid of the warning that PageSpeed insights generates and probably to increase it's score we have to deliver own copy of analytics.js or just proxy calls to www.google-analytics.com setting up needed headers for client-side caching.
Therefore it would be nice to have the domain as an optional parameter instead of herd coded string.
Hi,
There's a common issue while optimizing Google PageSpeed insights score. The thing is that https://www.google-analytics.com/analytics.js is delivered with cache-control:public, max-age=7200 header which is only 2 hours. Though, recommended value is at least 1 week (https://developers.google.com/speed/docs/insights/LeverageBrowserCaching), so to get rid of the warning that PageSpeed insights generates and probably to increase it's score we have to deliver own copy of analytics.js or just proxy calls to www.google-analytics.com setting up needed headers for client-side caching.
Therefore it would be nice to have the domain as an optional parameter instead of herd coded string.