on 05-03-2017 9:11 AM
Hello all,
I've created a custom SAPUI5 application, which is deployed to HCP and used within a launchpad. When I deploy a new version of this application, I manually have to clear the app cache as described here, however the CSS files within my application are not cleared (JavaScript and XML files are cleared correctly though).
Is there any way to force the invalidation of these CSS files contained in my application when I upload a new version? At the moment the users have to manually emtpy their browser's cache in order to see the latest changes in CSS.
Thank you in advanced.
Best regards,
Lidia
Hi
Change the css file reference in index.html. So for example if it is currently
<link rel="stylesheet" type="text/css" href="style.css">
add a css versioning, for example
<link rel="stylesheet" type="text/css" href="style.css?v20170503">
The change in the css reference will force the browser to read the style.css straight from the source and not from the browser cache.
Regards,
M-L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for your quick response, but I don't think this would be applicable in my case.
Since I'm running the application from the launchpad, the index.html is not even used. The request to retrieve the CSS files is automatically handled via manifest like this example
"sap.ui5": {"resources": { "css": [{ "uri": "css01/style.css" }] }........
The above piece of code is an extract from my manifest.js, at the moment my workaround is renaming the CSS folder every time I make any changes there, but I was hoping there was some proper way to handle this like the "clear app cache" for JS and XML files.
Any other suggestion?
Best regards,
Lidia
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.