cancel
Showing results for 
Search instead for 
Did you mean: 

Resource loading issue while using AppCacheBuster

Former Member
0 Kudos

Hi,

I want to use Application Cache Buster to load files from cache and when there is any modification in code, load from server.

I have followed the developer guide and created sap-ui-cachebuster-info.json and added data-sap-ui-appCacheBuster="./" in bootstrap

https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/ff7aceda0bd24039beb9bca8e882825d.html

But now it's enable to load the file and giving following error:

Uncaught Error: failed to load 'dia/cmc/contractlandscape/Component.js' from ./contractlandscape/Component.js: 404 - Not Found

It works fine, if I don't use application cache buster.

Following is my code in index.html

                                <script

                                                id="sap-ui-bootstrap"

                                                src="resources/sap-ui-core.js"

                                                data-sap-ui-theme="sap_bluecrystal"

                                                data-sap-ui-libs="sap.m"

                                                data-sap-ui-xx-bindingSyntax="complex"

                                                data-sap-ui-appCacheBuster="./"

                                                data-sap-ui-resourceroots='{

                                                                "dia.cmc": "./"

                                                }' >

                                </script>

 

                                <script>

                               

                                var oShell = new sap.m.Shell({

                                                                id:"idMainShell",

                                                                app : new sap.ui.core.ComponentContainer({

                                                                name : "dia.cmc.contractlandscape"

                                                                })

                                                });

                               

                                oShell.setAppWidthLimited(false);

                                oShell.placeAt("content");



Following is the content of sap-ui-cachebuster-info.json


{

  "contractlandscape/Component.js": "20150106154005",

}


Following is the declaration of Component.js file


jQuery.sap.declare("dia.cmc.contractlandscape.Component");


And following is folder structure


Please help in identifying the problem. Thanks..

Regards,

Vikram

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The XSEngine does not support the application cache buster concept.

Check the below link:

Application Cache Buster - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library

Regards,

Ritesh

SergioG_TX
Active Contributor
0 Kudos

I concur with Ritesh, XS engine does not support cache buster. the cache buster is for the non-HANA systems.

Former Member
0 Kudos

Hello,

I think you need to include the text like below in the index.html file


src="resources/sap-ui-cachebuster/sap-ui-core.js"

Have a look into the below link

SAPUI5 SDK - Demo Kit

coral_zhang
Explorer
0 Kudos

Hi Nagarjun,

My application is deployed on xsengine, when I include sap-ui-core.js as below,

<script src="/sap/ui5/1/resources/sap-ui-cachebuster/sap-ui-core.js"

  id="sap-ui-bootstrap"

  data-sap-ui-libs="sap.ui.commons, sap.ui.ux3,sap.ui.table, sap.m"

  data-sap-ui-xx-bindingSyntax="complex"

  data-sap-ui-resourceroots='{ "xxx": "./" }'

  data-sap-ui-theme="sap_bluecrystal"

  data-sap-ui-appCacheBuster="./"

  data-sap-ui-language="en">

  </script>

I got 404 error

  1. Request URL:http://myserver/sap/ui5/1/resources/sap-ui-cachebuster/sap-ui-core.js
  2. Request Method:GET
  3. Status Code:404 Not Found


coral_zhang
Explorer
0 Kudos

I have the same problem, have you got any solutions?