Skip to Content
avatar image
Former Member

Resource loading issue while using AppCacheBuster

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 28, 2015 at 11:34 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 20, 2015 at 09:42 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 21, 2015 at 07:09 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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