9 ms·
I'm not an expert, just curious... But aren't these files cached on most users computers?
by jopsen 8y ago
I'm not an expert, just curious... But aren't these files cached on most users computers?
- niel 8y agoanalytics.js as served by Google is only cached for two hours.
- yayana 8y agoSo a browser checks its hash up to 12 times a day for the surfer who never sleeps, no matter how many sites they visit.. If you are that concerned then your page views should be sent from the server side.
- jasonkester 8y agoNothing is ever really cached anymore, meaningfully at least. We're in an age where websites happily serve up 8mb JavaScript bundles to display their static homepage to a mobile browser that has maybe a couple hundred MB allocated to caching things. Sure, it may be there if you immediately load another page on that site (and the devs aren't using a bundler that serves a different 8mb next time). But if they leave and come back, they'll get the same full download experience.
- jefftk 8y agoFor what it's worth, I run a/b tests in my work where I consistently see large caching effects. For example, when we compare an experimental version of something to the currently deployed version it's critical that we cache-bust the control group. And changes that improve caching generally make things significantly better. Caching effects are much smaller on Safari with its per-domain cache, but even there if something broke caching for us it would be a high priority to fix. (I work at Google on ad tags)
- reaperducer 8y ago8mb JavaScript bundles to display their static homepage to a mobile browser that has maybe a couple hundred MB allocated to caching things Thanks for that. It explains why even on very high-end new phones, switching between complicated web sites in different tabs causes a reload.
- bzbarsky 8y agoIt depends. Browsers that care about user privacy and tracking are moving to first-party-isolated caching. So GA will be cached for a user on your site only if the user has visited _your_ site before.
- onlyrealcuzzo 8y agoAFAIK, GTM is specifically designed that it can only be cached on your website and it expires every 15 minutes. This is because your UAID is part of the URL to download the GTM snippit. The old-school analytics.js file can be cached, though. Someone correct me if this isn't true.