Skip to content

Override scriptSource for setting up Expires or Cache-Control headers #200

@sqrter

Description

@sqrter

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions