on 10-19-2015 11:06 AM
As described in this help link - Application Cache Buster - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library - App Cache Buster is also supported on HCP.
We have the following code which works well when deployed on Prem.
<script
id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-libs="sap.m,sap.ui.comp,sap.ui.core"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-resourceroots='{
"com.x.y": "./",
"webapp": "./webapp"}'
data-sap-ui-appCacheBuster="./">
</script>
When we deploy the same code on HCP, get the following error:
Observation:
URL formation for on-prem:
https://fqdn:port/sap/bc/ui5_ui5/sap/webapp/sap-ui-cachebuster-info.json?sap-ui-language=en_US
URL formation for HCP:
https://webapp-<hcpaccount>.dispatcher.hana.ondemand.com/sap-ui-cachebuster-info.json?sap-ui-language=en-US
Query:
Has anybody tried this out before and do we know of any solution ?
Regards,
Parag.
Had raise this issue via SMP and got the following reply:
the AppCacheBuster is not supported for HCP HTML5 applications out-of-the-box. The documentation is unfortunately misleading since it doesn't reflect the new HTML5 apps there and is based on the state for the Java applications:
For UI5 applications running on Java as well as for UI5 applications running on ABAP this file is generated automatically.
You should either remove the option data-sap-ui-appCacheBuster="./" on the bootstrap script which disables the application cachebuster or you create this file manually - but for
that scenario you have to take care that you handle the timestamps for the resources properly.
Regarding the HTML5 apps roadmap - till now it is not planned to support it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Parag,
Warm Greetings. In HCP, this can be done by using Application Descriptor File (neo-app.json). Kindly refer the below links that has more detailed info.
https://help.hana.ondemand.com/help/aed1ffa3f3e741b3a4573c9e475aa2a4.html
https://help.hana.ondemand.com/help/frameset.htm?1814d3603acd4ab18102a3b4984687b4.html
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ajay,
The link you have shared is for cache control; specifically for static resources with a "age". My query is on cache buster - clearing the cache / reloading when there is a new resource.
Application cache buster primarily allows you to cache the application resource files in the browser till a new file is uploaded on the server. This is determined by comparing the time-stamps and handled by the framework.
Regards,
Parag.
Hello Parag,
I am using a HTML5 Application on my HANA Trial and here application cachebuster works with out any issues. I usre routing to access my UI5 resources and route in my app. descriptor is as follows:
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
}
My welcome file is index.html and here is the bootstrapping part:
<script id="sap-ui-bootstrap"
src="resources/sap-ui-cachebuster/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-appCacheBuster="./"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-resourceroots='{"<namespace>": "./"}'>
</script>
Below are the screens which shows the same. Please give a try.
Regards,
Ajay
Very strage, have similar settings for neo.app and script tag.
"routes": [
{
"path": "/resources",
"target": {
"type": "service",
"name": "sapui5",
"entryPath": "/resources"
},
"description": "SAPUI5 Resources"
},
<script id="sap-ui-bootstrap"
src="resources/sap-ui-cachebuster/sap-ui-core.js"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-libs="sap.m,sap.ui.comp,sap.ui.core"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-appCacheBuster="./"
data-sap-ui-resourceroots='{
"<NAMESPACE>": "./",
"view": "./view"}'
data-sap-ui-language="en">
</script>
For us as well the first 2 URLs are working well.
https://XXXX.dispatcher.hana.ondemand.com/resources/sap-ui-cachebuster/sap-ui-core.js
Its only the 3rd URL of the cache buster json which returns a 404.
https://XXXX.dispatcher.hana.ondemand.com/sap-ui-cachebuster-info.json?sap-ui-language=en
Is there a setting in HCP cockpit that we are missing ? Tried it in developer account as well as trial account with same result.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.