utag.js browser cache

iwan_uswak
Silver Contributor
Silver Contributor iwan_uswak

Is it possible to change the file header of the utag.js JavaScript filte to adjust caching time?

 

https://developers.google.com/speed/docs/insights/LeverageBrowserCaching

 

4 REPLIES 4

utag.js browser cache

thyngster
Bronze Contributor
Bronze Contributor thyngster

That's something that needs to be done server-side, and Tealium doesn't allow to customize the header values for the utag.js requests ( as I expect this being something set and shared by all clients ).

utag.js browser cache

Tealium Employee
@iwan_uswak I'm guessing you're asking this question because a google Page Speed Insights report has shown that utag.js has a short cache control header value? The reason for this is to ensure that when you publish in Tealium iQ, that your visitors always get the latest version of the utag.js files. This is a global setting, and cannot be changed on a per-account basis, as @thyngster correctly stated.

The result of this header is that the browser will check for a new file once the 5 minute period has expired, but if the file has not been modified, our multi-CDN network returns a "304 - Not Modified" response, which instructs the browser to load the file from cache, and results in only a very minimal amount of data transfer (just header data), since the utag files do not need to be retransmitted.

I hope this adequately explains the reasons for this header setting. It is therefore safe to ignore any warnings about it in page speed reports, since it is not really having a significant effect on your page load. Please let me know if anything is unclear.

Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Highlighted

utag.js browser cache

gianluca
Bronze Contributor
Bronze Contributor gianluca

Hi @craig_rouse,

is your explanation already valid or are there some news?

I received a request to increase cache period for utag.js file, utag.sync file and I wuold like to know if it is ok to answer that this is a global setting and cannot be changed on a per-account basis.

Thank you very much

utag.js browser cache

Tealium Employee
@gianluca My answer still stands. There is no way to increase the cache period for any utag assets, and no plans to add this at present. As I stated previously, the way the Multi-CDN is configured will not harm your page speed, despite its relatively short cache period. If a file hasn't been changed, it will not be re-downloaded. What's the reason you want to increase the cache control header value?
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.