Skip to Content

SAP MII UI5 Application Cache Buster not working

Nov 28, 2017 at 03:19 PM


avatar image

I have not found a clear answer for this issue. UI5 application files are caching and are not updating when the files change on the server. The MII server installed on NetWeaver 7.5 AS Java is not creating the sap-ui-cachebuster-info.json file. Am I missing a step or is my project not structured correctly?

System information:

  • NetWeaver 7.5 AS Java
  • MII 15.1 sp 03 patch 16
  • SAPUI5 on server v1.38.11

On MII server web.xml file:

  • f:\usr\sap\M5D\J00\j2ee\cluster\apps\\xapps~xmii~ear\servlet_jsp\XMII\root\WEB-INF\web.xml
  • Added
<!-- ============================================================== -->
<!-- AppCacheBuster Filter                                          -->
<!-- ============================================================== -->

In the application Index.irpt:

  • http://<server name>:50000/XMII/CM/coeMES/Index.irpt
  • Component.js and manifest.json are in the same folder as Index.irpt
<script src="/sapui5/resources/sap-ui-cachebuster/sap-ui-core.js"

The server has been rebooted a few times when trying to troubleshoot this issue. I have found related support articles, but nothing seems to work (most seem to cover UI5 running on NetWeaver AS ABAP).

Enable Filter for JAVA Applications

App Cache Buster - for ABAP Server

MII Related Cache Buster Question - Enable Caching of JS Files

MII Related Cache Buster Question - Not Rebuilding File

webxml.txt (26.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
christian libich Nov 28, 2017 at 05:19 PM

I haven't looked at it in a while but I think the cache buster only works for ui5 apps served on the abap stack. The solution I came up with for application resources served from MII is to create a version.json file with something like { "_TheAppVersion": "1.0" } in it that I update every time we make a change or move a project. Then I do something like the code below when I init the app. This works because UI5 loads all of the application resources via ajax. We are basically appending a version number to all ajax call urls globally with the ajax setup. So if the version/url value is the same as what the the browser already has cached it won't go out and download the files again. If the version/url has changed the browser will go get the new files. Note this method only really works for application resources not necessarily the core ui5 library.

Salvatore Castro and Michael Solwecki , is there an official/supported way that you know of to handle this issue re MII?

 sap.ui.getCore().attachInit(function () {

            //force update on page load if version changed - i.e. app cache buster
            $.post( "/XMII/CM/TheApp/version.json?"
                + "&__=" + new Date().getTime()
                , function(data){
                        data: {
                            _TheAppVersion: data._TheAppVersion
                    var theapp = new sap.ui.core.ComponentContainer({
                        name : "TheApp",
                        height : "100%"
                , 'json'


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you for the quick response christian libich. I will attempt this route until SAP provides an official solution. Hopefully Sam knows if this is available.

Michael Solwecki
Jan 24 at 03:24 PM

I can tell you that Netweaver AS Java 7.5 doesn't support the AppCacheBusterFilter. It is only in the ABAP release.

We are taking a look at implementing a similar solution for MII in MII 15.1 to better handle caching but it is not released yet.

10 |10000 characters needed characters left characters exceeded