TTL for custom JS files

diptichauhan
Level 1

TTL for custom JS files

Hi All

We have out custom JS file that's cached at the Adobe CDN. I noticed that its TTL is shorter than what we have for forms2.css and forms2.js.

Is there any chance we can increase the TTL for those custom files too? It would really help us out.

Thanks a bunch!

 

3 REPLIES 3
Disha_Goyal6
Level 4

Re: TTL for custom JS files

Hi @diptichauhan, where you have added this custom files?

Nitinsharma
Level 1

Re: TTL for custom JS files

Hi Disha,
We have created this custom javascript for switching between Marketo forms on the bases of country values. This script is currently stored in our Marketo production instance under Design studio and it is also cached at adobe cloud as well. And we have used this js on our external website(for a Hosted Marketo form). However, currently the TTL(Cache control) is only 60, we want to increase this to 14400 (similar to forms2.min.js) so that the page performance can be increased.

OWP Js TTL - 60.png

 

SanfordWhiteman
Level 10 - Community Moderator

Re: TTL for custom JS files

There are 2 ways to embed Marketo-hosted JS assets and you’re choosing the one that’s least conducive to caching.

 

If you include the JS with no query string, it explicitly expires after 60 seconds.

 

If you append the query param version (e.g. ?version=0) then the file doesn’t contain explicit expiration but is heuristically cached using the browser’s internal logic, i.e. the further you get from the file’s Last-Modified date, the longer it’s cached. This option suffices for the vast majority of cases.