Expand my Community achievements bar.

SOLVED

How to cache-bust DTM tag on production?

Avatar

Level 1

Hi,

What is the best way to cache-bust the DTM library tag (JS file) whenever rules are "Published" to production?

One solution I had was to add a query string parameter at the end of the DTM tag with a static version number like:

"//assets.adobedtm.com/.../satelliteLib-XXX.js?v=1.0.0"

javascript - Cache busting via params - Stack Overflow

However, this would be a very manual process, and will require access to the code to make continuous updates to the tag.

Do you foresee running into any issues with any of Adobe tools like Analytics, AM, Target, etc?

CACHED DTM ISSUES

We've had two websites that went through a major redesign and noticed one major UI issue:

There were elements misaligned because several DTM Page Rules were looking for old HTML elements that did not exist anymore.

Thank you!
~ Joshua ~

1 Accepted Solution

Avatar

Correct answer by
Level 10

I've asked around and no one thought there would be any issue with using the query string version. However, as always, test in staging before deploying to production.

joshd7227840​ - Do you happen to have any tips/tricks you could share here by chance?

View solution in original post

4 Replies

Avatar

Level 10

Hi Joshua,

This solution might work, however, it's going to require that you update the code on the page with a new query string each time you publish.

Also, we are currently working with Akamai to set max age cache control headers for both DTM and Launch. Once Akamai finishes their piece, both DTM and Launch libraries will have a 1 hour cache control.

*This cache control is subject to the browser following what we set in the header. Ultimately, the browser has full control over what it caches and for how long. We will just be sending instructions along with the library for the browser to follow.

Thanks,
Jantzen

Avatar

Level 1

Hi Jantzen,

Other than the manual process to update the query string version, do you see any issues with appending the query string?

Thank you for the update regarding the future cache control in Akamai/DTM!

As you've mentioned even if you do set some expiration time, browsers have full control.

I'm also trying to figure out how long Chrome's "from disk cache" and "from memory cache" lasts. If you have any insight in this as well, it'll be greatly appreciated.

For the time being, if you do not see any issues, I think I'll lean towards setting up the query string versioning for occasional DTM cache-busting for drastic changes.

Thank you,

~ Joshua ~

Avatar

Correct answer by
Level 10

I've asked around and no one thought there would be any issue with using the query string version. However, as always, test in staging before deploying to production.

joshd7227840​ - Do you happen to have any tips/tricks you could share here by chance?