0

Google Tag Manager's JS file is not "cached" normally and requires an extra connection to another server (i.e. new SSL handshake and DNS call).

I was wondering is it beneficial to do an Apache proxy cache to the file and refer to it locally setting the caching settings to something more well defined.

1

gtm.js is a dynamic library whose contents change with every container version publish. Thus it's not something you should even try to cache, or else your updates to the container might not be recognized by the browsers of returning visitors.

0

It depends, Google's JS files such as analytics are frequently used in most websites. A good chance is the visitor already got a cached copy of the file before he visits your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.