3 ms·
A quick check, GTM is only cached for 15mins. If users spend a bit of time navigating your site, you might get better caching by adding this to your JS file an
by rovr138 8y ago
A quick check, GTM is only cached for 15mins.
If users spend a bit of time navigating your site, you might get better caching by adding this to your JS file and caching for longer.
- yayana 8y agoGTM used to load async, but they wanted to support A/B testing.. If you aren't using A/B testing then you would get perfectly good performance by using the older GTM snippet, it will just continue to use bandwidth at these 15 minute intervals. Even then it probably will only test the hash to see if the container changed.. This seems to me like one real problem that is pretty trivial to fix leading to a lot of over tuning for some kind of ideal.. and then being stuck if you need to support anything else.
- seanwilson 8y agoThat only means it needs to check if there's a new version every 15 minutes though (e.g. by file hash or modification date), not that it has to download it again even if there's no changes every 15 minutes. I haven't looked into the cache settings though.