Is there some configuration setting I need to use to get Webworks (on BB10) to cache images served from a server?
I have a BB10 Webworks application that dynamically adds and remove html from the DOM. Images referenced in elements load as expected, but if the element is removed from the DOM and, later, added in again, Webworks reloads the image file from the server rather than using a cached version. (I can watch it happening in Web Inspector.)
If I run the same code in a Chrome browser on Windows, it behaves properly, using the cached copy of the image when the new element is added to the DOM.
The HTTP Resonse headers from the server are:
Cache-Control:public, must-revalidate
Content-Length:1730
Content-Type:image/jpeg
Date:Mon, 21 Oct 2013 21:18:34 GMT
ETag:c4863b363e4536f8d854d721092cf528
Expires:Wed, 20 Nov 2013 21:18:34 +0000
Last-Modified:Mon, 04 Feb 2013 17:20:13 +0000
MicrosoftOfficeWebServer:5.0_Pub
Server:Microsoft-IIS/6.0
X-Powered-By:PHP/5.2.13, ASP.NET
So, with the Response codes above, Chrome caches the image as expected, while BB10 Webworks reloads it from the server each time (no caching).
I'm running on a Blackberry Z10, Model number STL100-3, Software Release 10.1.0.4181, and the app is created using Blackberry 10 Webworks SDK 1.0.4.11.
What am I missing here?
Thanks,
Terry