src/sap.ui.core/src/sap/ui/core/AppCacheBuster.js
function() {

				// activate the session (do not create the session for compatibility reasons with mIndex previously)
				oSession.active = true;

				// store the original function / property description to intercept
				fnValidateProperty = ManagedObject.prototype.validateProperty;
				descScriptSrc = Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype, "src");
				descLinkHref = Object.getOwnPropertyDescriptor(HTMLLinkElement.prototype, "href");

				// function shortcuts (better performance when used frequently!)
				var fnConvertUrl = AppCacheBuster.convertURL;
				var fnNormalizeUrl = AppCacheBuster.normalizeURL;

				// resources URL's will be handled via standard
				// UI5 cachebuster mechanism (so we simply ignore them)
				var fnIsACBUrl = function(sUrl) {
					if (this.active === true && sUrl && typeof (sUrl) === "string") {
						sUrl = fnNormalizeUrl(sUrl);
						return !sUrl.match(oFilter);
					}
					return false;
				}.bind(oSession);

				// enhance xhr with appCacheBuster functionality
				fnXhrOpenOrig = XMLHttpRequest.prototype.open;
				XMLHttpRequest.prototype.open = function(sMethod, sUrl) {
					if (sUrl && fnIsACBUrl(sUrl)) {
						arguments[1] = fnConvertUrl(sUrl);
					}
					fnXhrOpenOrig.apply(this, arguments);
				};
				fnEnhancedXhrOpen = XMLHttpRequest.prototype.open;

				// enhance the validateProperty function to intercept URI types
				//  test via: new sap.ui.commons.Image({src: "acctest/img/Employee.png"}).getSrc()
				//            new sap.ui.commons.Image({src: "./acctest/../acctest/img/Employee.png"}).getSrc()
				ManagedObject.prototype.validateProperty = function(sPropertyName, oValue) {
					var oMetadata = this.getMetadata(),
						oProperty = oMetadata.getProperty(sPropertyName),
						oArgs;
					if (oProperty && oProperty.type === "sap.ui.core.URI") {
						oArgs = Array.prototype.slice.apply(arguments);
						try {
							if (fnIsACBUrl(oArgs[1] /* oValue */)) {
								oArgs[1] = fnConvertUrl(oArgs[1] /* oValue */);
							}
						} catch (e) {
							// URI normalization or conversion failed, fall back to normal processing
						}
					}
					// either forward the modified or the original arguments
					return fnValidateProperty.apply(this, oArgs || arguments);
				};

				// create an interceptor description which validates the value
				// of the setter whether to rewrite the URL or not
				var fnCreateInterceptorDescriptor = function(descriptor) {
					var newDescriptor = {
						get: descriptor.get,
						set: function(val) {
							if (fnIsACBUrl(val)) {
								val = fnConvertUrl(val);
							}
							descriptor.set.call(this, val);
						},
						enumerable: descriptor.enumerable,
						configurable: descriptor.configurable
					};
					newDescriptor.set._sapUiCoreACB = true;
					return newDescriptor;
				};

				// try to setup the property descriptor interceptors (not supported on all browsers, e.g. iOS9)
				var bError = false;
				try {
					Object.defineProperty(HTMLScriptElement.prototype, "src", fnCreateInterceptorDescriptor(descScriptSrc));
				} catch (ex) {
					Log.error("Your browser doesn't support redefining the src property of the script tag. Disabling AppCacheBuster as it is not supported on your browser!\nError: " + ex);
					bError = true;
				}
				try {
					Object.defineProperty(HTMLLinkElement.prototype, "href", fnCreateInterceptorDescriptor(descLinkHref));
				} catch (ex) {
					Log.error("Your browser doesn't support redefining the href property of the link tag. Disabling AppCacheBuster as it is not supported on your browser!\nError: " + ex);
					bError = true;
				}

				// in case of setup issues we stop the AppCacheBuster support
				if (bError) {
					this.exit();
				}

			}
function() {

				// activate the session (do not create the session for compatibility reasons with mIndex previously)
				oSession.active = true;

				// store the original function / property description to intercept
				fnValidateProperty = ManagedObject.prototype.validateProperty;
				descScriptSrc = Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype, "src");
				descLinkHref = Object.getOwnPropertyDescriptor(HTMLLinkElement.prototype, "href");

				// function shortcuts (better performance when used frequently!)
				var fnConvertUrl = AppCacheBuster.convertURL;
				var fnNormalizeUrl = AppCacheBuster.normalizeURL;

				// resources URL's will be handled via standard
				// UI5 cachebuster mechanism (so we simply ignore them)
				var fnIsACBUrl = function(sUrl) {
					if (this.active === true && sUrl && typeof (sUrl) === "string") {
						sUrl = fnNormalizeUrl(sUrl);
						return !sUrl.match(oFilter);
					}
					return false;
				}.bind(oSession);

				// enhance xhr with appCacheBuster functionality
				fnXhrOpenOrig = XMLHttpRequest.prototype.open;
				XMLHttpRequest.prototype.open = function(sMethod, sUrl) {
					if (sUrl && fnIsACBUrl(sUrl)) {
						arguments[1] = fnConvertUrl(sUrl);
					}
					fnXhrOpenOrig.apply(this, arguments);
				};
				fnEnhancedXhrOpen = XMLHttpRequest.prototype.open;

				// enhance the validateProperty function to intercept URI types
				//  test via: new sap.ui.commons.Image({src: "acctest/img/Employee.png"}).getSrc()
				//            new sap.ui.commons.Image({src: "./acctest/../acctest/img/Employee.png"}).getSrc()
				ManagedObject.prototype.validateProperty = function(sPropertyName, oValue) {
					var oMetadata = this.getMetadata(),
						oProperty = oMetadata.getProperty(sPropertyName),
						oArgs;
					if (oProperty && oProperty.type === "sap.ui.core.URI") {
						oArgs = Array.prototype.slice.apply(arguments);
						try {
							if (fnIsACBUrl(oArgs[1] /* oValue */)) {
								oArgs[1] = fnConvertUrl(oArgs[1] /* oValue */);
							}
						} catch (e) {
							// URI normalization or conversion failed, fall back to normal processing
						}
					}
					// either forward the modified or the original arguments
					return fnValidateProperty.apply(this, oArgs || arguments);
				};

				// create an interceptor description which validates the value
				// of the setter whether to rewrite the URL or not
				var fnCreateInterceptorDescriptor = function(descriptor) {
					var newDescriptor = {
						get: descriptor.get,
						set: function(val) {
							if (fnIsACBUrl(val)) {
								val = fnConvertUrl(val);
							}
							descriptor.set.call(this, val);
						},
						enumerable: descriptor.enumerable,
						configurable: descriptor.configurable
					};
					newDescriptor.set._sapUiCoreACB = true;
					return newDescriptor;
				};

				// try to setup the property descriptor interceptors (not supported on all browsers, e.g. iOS9)
				var bError = false;
				try {
					Object.defineProperty(HTMLScriptElement.prototype, "src", fnCreateInterceptorDescriptor(descScriptSrc));
				} catch (ex) {
					Log.error("Your browser doesn't support redefining the src property of the script tag. Disabling AppCacheBuster as it is not supported on your browser!\nError: " + ex);
					bError = true;
				}
				try {
					Object.defineProperty(HTMLLinkElement.prototype, "href", fnCreateInterceptorDescriptor(descLinkHref));
				} catch (ex) {
					Log.error("Your browser doesn't support redefining the href property of the link tag. Disabling AppCacheBuster as it is not supported on your browser!\nError: " + ex);
					bError = true;
				}

				// in case of setup issues we stop the AppCacheBuster support
				if (bError) {
					this.exit();
				}

			}
function ( ) { // activate the session (do not create the session for compatibility reasons with mIndex previously) oSession . active = true ; // store the original function / property description to intercept fnValidateProperty = ManagedObject . prototype . validateProperty ; descScriptSrc = Object . getOwnPropertyDescriptor ( HTMLScriptElement . prototype , "src" ) ; descLinkHref = Object . getOwnPropertyDescriptor ( HTMLLinkElement . prototype , "href" ) ; // function shortcuts (better performance when used frequently!) var fnConvertUrl = AppCacheBuster . convertURL ; var fnNormalizeUrl = AppCacheBuster . normalizeURL ; // resources URL's will be handled via standard // UI5 cachebuster mechanism (so we simply ignore them) var fnIsACBUrl = function ( sUrl ) { if ( this . active === true && sUrl && typeof ( sUrl ) === "string" ) { sUrl = fnNormalizeUrl ( sUrl ) ; return ! sUrl . match ( oFilter ) ; } return false ; } . bind ( oSession ) ; // enhance xhr with appCacheBuster functionality fnXhrOpenOrig = XMLHttpRequest . prototype . open ; XMLHttpRequest . prototype . open = function ( sMethod , sUrl ) { if ( sUrl && fnIsACBUrl ( sUrl ) ) { arguments [ 1 ] = fnConvertUrl ( sUrl ) ; } fnXhrOpenOrig . apply ( this , arguments ) ; } ; fnEnhancedXhrOpen = XMLHttpRequest . prototype . open ; // enhance the validateProperty function to intercept URI types //  test via: new sap.ui.commons.Image({src: "acctest/img/Employee.png"}).getSrc() //            new sap.ui.commons.Image({src: "./acctest/../acctest/img/Employee.png"}).getSrc() ManagedObject . prototype . validateProperty = function ( sPropertyName , oValue ) { var oMetadata = this . getMetadata ( ) , oProperty = oMetadata . getProperty ( sPropertyName ) , oArgs ; if ( oProperty && oProperty . type === "sap.ui.core.URI" ) { oArgs = Array . prototype . slice . apply ( arguments ) ; try { if ( fnIsACBUrl ( oArgs [ 1 ] /* oValue */ ) ) { oArgs [ 1 ] = fnConvertUrl ( oArgs [ 1 ] /* oValue */ ) ; } } catch ( e ) { // URI normalization or conversion failed, fall back to normal processing } } // either forward the modified or the original arguments return fnValidateProperty . apply ( this , oArgs || arguments ) ; } ; // create an interceptor description which validates the value // of the setter whether to rewrite the URL or not var fnCreateInterceptorDescriptor = function ( descriptor ) { var newDescriptor = { get : descriptor . get , set : function ( val ) { if ( fnIsACBUrl ( val ) ) { val = fnConvertUrl ( val ) ; } descriptor . set . call ( this , val ) ; } , enumerable : descriptor . enumerable , configurable : descriptor . configurable } ; newDescriptor . set . _sapUiCoreACB = true ; return newDescriptor ; } ; // try to setup the property descriptor interceptors (not supported on all browsers, e.g. iOS9) var bError = false ; try { Object . defineProperty ( HTMLScriptElement . prototype , "src" , fnCreateInterceptorDescriptor ( descScriptSrc ) ) ; } catch ( ex ) { Log . error ( "Your browser doesn't support redefining the src property of the script tag. Disabling AppCacheBuster as it is not supported on your browser!\nError: " + ex ) ; bError = true ; } try { Object . defineProperty ( HTMLLinkElement . prototype , "href" , fnCreateInterceptorDescriptor ( descLinkHref ) ) ; } catch ( ex ) { Log . error ( "Your browser doesn't support redefining the href property of the link tag. Disabling AppCacheBuster as it is not supported on your browser!\nError: " + ex ) ; bError = true ; } // in case of setup issues we stop the AppCacheBuster support if ( bError ) { this . exit ( ) ; } }
Initializes the AppCacheBuster. Hooks into the relevant functions
in the Core to intercept the code which are dealing with URLs and
converts those URLs into cachebuster URLs.

The intercepted functions are:
<ul>
<li><code>XMLHttpRequest.prototype.open</code></li>
<li><code>HTMLScriptElement.prototype.src</code></li>
<li><code>HTMLLinkElement.prototype.href</code></li>
<li><code>sap.ui.base.ManagedObject.prototype.validateProperty</code></li>
</ul>

@private
Initializes the AppCacheBuster . Hooks into the relevant functions in the Core to intercept the code which are dealing with URLs and converts those URLs into cachebuster URLs .