cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent Browser Caching of UI5 Application Resources

Former Member

Hi Gurus,

We have an SAPUI5 App deployed on SAP PO. The problem is that whenever we do changes and deploy the new version of our application, the changes are not reflected and we need to do a Hard Reload and Clear browser Cache to fetch new changes. This is causing a lot of issues as we cannot ask clients to clear cache after every change.

Below are the unsuccessful methods we tried so far:

1. Enabling "resources/sap-ui-cachebuster/sap-ui-core.js" in SAPUI5 bootstrap.

2. Using 'Application Cache buster' for application resource ( using sap-ui-cachebuster-info.json)

3. Setting HTML header to keep no cache:

<meta http-equiv='cache-control' content='no-cache, no-store, must-revalidate'>
<meta http-equiv='Expires' content='-1'>
<meta http-equiv='Pragma' content='no-cache'>

4. Clear cookies with below code:

document.cookie.split(";").forEach(function(c) { 
document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); 
});

None of the above solutions have worked so far. This is what we see in Networks tab of Chrome:

NOTE: Application is deployed on SAP PO 7.4 ( JAVA Stack)

Accepted Solutions (0)

Answers (0)