Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does increasing the modification attribute do?

Tags:

tridion

In %TRIDION_HOME%\web\WebUI\WebRoot\Configuration\System.config we can increment the modification attribute's value to instruct the Content Manager to force a download of items.

The setting is mentioned on the PowerTools discussion but also on the Skinning the Content Manager Explorer topic on SDL Live Content.

<server version="6.1.0.55920" modification="7">

Alternatives to updating the CME include clearing browser cache (CTRL+Shift+Delete in Chrome) or setting cache settings per user.

Question

Should I use this for any CM-side changes such as GUI extensions, schema changes, or template linked schemas? Or does it only apply to certain parts of the Content Manager Explorer?

In other words, after a schema and template change, what's the best way to make users get the latest versions of components, schema drop-downs, and template selections?

like image 771
Alvin Reyes Avatar asked Feb 01 '13 20:02

Alvin Reyes


2 Answers

The values of the modification and version attributes become part of the URL of every CSS and JavaScript file that the Tridion UI generates/merges and of many of the static (image) files too. So the URLs look like this edit_v.6.1.0.55920.7.aspx?mode=css. Since the browser sees this as a new URL, there is no way it can have the file in its cache yet. And thus it will always have to download the files from the server, instead of using (possibly outdated) files from the local cache.

This is a technique of injecting some version information into the URL is known as "URL fingerprinting". Google commonly embeds a hash-value of the file into the URL, ensuring that the fingerprinting happens without requiring the developers to increase a version number manually. But whichever way of fingerprinting is used, the technique is a pretty efficient way to ensure that all browsers download the latest version of your code.

If you are developing a GUI extension, you can indeed typically get the same effect by clearing your browser cache or even disabling it completely (for the Tridion domain). But once you roll out your extension to a non-development server, changing the modification attribute is the most certain way to ensure that all your users get the latest JavaScript/CSS changes without each of them having to clear their cache manually.

The URL fingerprinting in Tridion only affects CSS, JavaScript and image files. The actual CMS data (such as Schemas and Components) is loaded using XMLHttpRequests and thus not affected by the modification attribute.

like image 182
Frank van Puffelen Avatar answered Oct 21 '22 22:10

Frank van Puffelen


As far as I know,

<server version="6.1.0.55920" modification="7">

This clears only JS and CSS related caching. When a User access the CM then CM loads all the files including latest copies.

Should I use this for any CM-side changes such as GUI extensions, schema changes, or template linked schemas? Or does it only apply to certain parts of the Content Manager Explorer?

For this line, answer is No. Since when ever user does any changes to schema, changes should refresh on all publications. Currently this is not happening on the browser.

Hopefully this might be fixed in on coming versions.

In other words, after a schema and template change, what's the best way to make users get the latest versions of components, schema drop-downs, and template selections?

Currently user should do a forceful refresh to get updated info on all publications.

like image 22
Siva Charan Avatar answered Oct 21 '22 21:10

Siva Charan