What does increasing the modification attribute do?
Asked Answered
L

3

8

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?

Listing answered 1/2, 2013 at 20:53 Comment(0)
E
9

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.

Ecclesia answered 3/2, 2013 at 2:21 Comment(0)
G
3

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.

Graces answered 2/2, 2013 at 8:12 Comment(0)
B
2

The SDL Tridion CMS interface caches CMS Items in order to provide faster browsing and loading of its own interface. This does mean that sometimes:

  • Custom GUI extensions may not display latest versions of the files
  • Recently created or modified CMS items may not be shown, or show the latest version.

This is why sometimes a new keyword isn't shown within a component field, or a new component template isn't shown when trying to add a component page.

Incrementing the modification number in the node will cause all CMS items to show the latest versions to the CMS user(s). You'll see if uses this value to reference CSS and JS files used by the CMS GUI.

As a developer I also turn off my Firefox cache (I prefer firefox for the firebug extension which is great for working with GUI extensions) as this means you don't need to go and change this value, a simple browser refresh seems to always do the trick. Turning off cache is explained here : https://superuser.com/questions/23134/how-to-turn-off-the-firefox-cache

Bremble answered 1/2, 2013 at 21:33 Comment(1)
Have to disagree with you, John. Frank is correct about the scope of the attribute -- the caching of items such as Keywords are not affected.Everything

© 2022 - 2024 — McMap. All rights reserved.