Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit is happening now. Discover what's next in customer experience.
SOLVED

DTM Production Embed Code Never Caches? [SOLVED] It is getting cached

Avatar

Level 2

Is this true? Or am I reading the HTTP response headers wrong?

[img]dtm-http-header.png[/img]

 

It seems like all the scripts from DTM are not cached.  I am new to DTMs, and it just seems wrong to not cache anything client-side.

 

[SOLVED]

I was reading the headers incorrectly and DTM code is getting caching by the browser.  Thanks for all your responses.

1 Accepted Solution

Avatar

Correct answer by
Employee

Per your screenshot, the headers/responses indicate that your browser loaded a cached version of the script file.

The 'cache-control' in the response is set to '0' which, effectively, means that the browser should check the last-modified date and only load the file from the browser cache if the cached file is the same age or newer. (If 'cache-control' was set to 'no-cache', then it would mean the server was telling the browser to never load from cache, i.e. always load from the server.)

The '304' response confirms this - it means the browser followed the server's instructions. The browser compared last-modified dates, finding that the file on the server doesn't have a newer modified date, so it just loaded the file from its cache.

HTTP headers, including 'cache-control', are not a simple concept to understand. If you'd like to better understand, you might try reading through the spec, or doing a search to find some of the more human-readable explanations out there.

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Per your screenshot, the headers/responses indicate that your browser loaded a cached version of the script file.

The 'cache-control' in the response is set to '0' which, effectively, means that the browser should check the last-modified date and only load the file from the browser cache if the cached file is the same age or newer. (If 'cache-control' was set to 'no-cache', then it would mean the server was telling the browser to never load from cache, i.e. always load from the server.)

The '304' response confirms this - it means the browser followed the server's instructions. The browser compared last-modified dates, finding that the file on the server doesn't have a newer modified date, so it just loaded the file from its cache.

HTTP headers, including 'cache-control', are not a simple concept to understand. If you'd like to better understand, you might try reading through the spec, or doing a search to find some of the more human-readable explanations out there.

Avatar

Level 3

Hi,

 

Here is an article that talks about embed code (how to add them) http://adobe.ly/1fD4Gm7 . You may refer to this article as a start. Please let us know if you need additional support. Would be glad to assist.

 

Thanks,

Avik