on 11-26-2013 4:13 PM
I have enabled the cache-buster mechanism and found that it seems to be working for most of the sap resources and the application resources (images, data files).
However testing with the desktop chrome profiling tools tell me that the specific application JS files (views, controllers) are not being cached by the browser. I assume that this is also the case when I run on a mobile device.
So I need to find out if there is something more I need to do to enable the application JS files to become cached locally on the mobile device as well as all the SAP resources. Does the 1.16 version update provide anything extra on the cache buster mechanism (I have been working with 1.14)?
I do have a web.xml file in my WEB-INF folder and my local tomcat totally agrees on using it It does exactly what I expect. Only on MII it appears like my web.xml is not picked up at all. Are there special conventions (e.g. path to put the web.xml) or configuration options differing from Java Standards in the SAP World?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of NetWeaver are you running and how are you deploying? Do you see any errors in the logs. I expect the issue is that it can't resolve the library containing the ResourceServlet on the portal server.
I seem to remember that we had to add the library reference ui~five in the application-j2ee-engine.xml
<?xml version="1.0" encoding="UTF-8"?>
<application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">
<reference reference-type="hard">
<reference-target target-type="application" provider-name="sap.com">ui~five</reference-target>
</reference>
</application-j2ee-engine>
Regards,
Jason
Hi Jason,
our applications are running inside of MII which itself is a Web Module
The ui~five Web Module is deployed separately under the absolute path /sapui5 and has the ResourceServlet up and running. Our Applications reference it like this:
<script id="sap-ui-bootstrap" | |
src="/sapui5/resources/sap-ui-cachebuster/sap-ui-core.js" | |
data-sap-ui-theme="sap_bluecrystal" | |
data-sap-ui-libs="sap.m" | |
data-sap-ui-appCacheBuster="./" | |
</script> |
So if I understood correctly I would have to deploy the UI5 applications as separate Web Modules referencing Web Module ui~five? Is that what you are saying. I'm really confused
BR
Chris
Hi Chris,
The ui~five web model ResourceServlet will handle any requests to /sapui5/xxx, however your application will be handled by a different url (web model), therefore you need to configure the application web.xml to use the ResourceServlet.
The application web model doesn't include the ResourceSevlet class, so you need to provide the reference to the jar file so it can be loaded.
Regards,
Jason
Hi Jeremy,
I am trying to use the cache-buster mechanism too and while it seems to work when I test in Chrome, I am not convinced that it works on a mobile device (I am using iOS 7) - it still seems to take a very long time to start the app on the mobile device so I don't think the cache is working...
Did you see an improvement in performance on you mobile device?
Thanks,
Simon
p.s. Sorry I can't help with you actual question!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
I'm not sure these settings will improve performance, might make it slightly worse if files change and need to be downloaded.
The mechanism ensures that any changes to the javascripts are downloaded by changing the url, to prevent the browser cache relying on the expires time and caching the old version.
Have you checked in chrome that the header variables expires, cache-control etc are being passed?
I think you can also check the sap-ui-cachebuster-info.json file to what timestamps are being used for each of the application files.
You also need to ensure the AppCacheBusterFilter is configured in the web.xml, this was something that I missed.
Thanks,
Jason
Have you tried the Application cache buster? Looking at the documentation it can be enabled via the configuration option sap-ui-appcachebuster
https://sapui5.hana.ondemand.com/sdk/docs/guide/CacheBuster.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've installed on a Java stack, but not MII specifically.
Have you defined a web.xml file for your project, the application files need to be handled by the ResourceServlet which implements the cache mechanism.
Many thanks,
Jason
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.