<div dir="ltr">Hi,<div><br></div><div>the CacheRead and CacheWrite controls use Local Storage, so your tiles even persist after closing the browser, restarting your device, etc.</div><div><br></div><div>If they don't, then maybe you have configured something in a wrong way. Have you looked at <a href="http://openlayers.org/dev/examples/offline-storage.html">http://openlayers.org/dev/examples/offline-storage.html</a> and made sure that your app configures the controls in a similar way? Also be aware, as already discussed, that you either need a server that sends CORS headers, or a proxy to work around the same origin restriction.</div>
<div><br></div><div>Andreas.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 16, 2014 at 6:16 PM, ANC <span dir="ltr"><<a href="mailto:anajera@bicimapas.com.mx" target="_blank">anajera@bicimapas.com.mx</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the information Andreas.<br>
<br>
Continuing with this topic, in order to have a full offline option, I have<br>
added a manifest file to load the full page and openlayers functionality to<br>
be cached.  I then, while being online,  load the page, cache the tiles for<br>
the area of interest and then go offline. The cached tiles show as expected.<br>
But if, while being offline and to test whether the tiles remain available<br>
between sessions, I do a refresh or open the page in a new window after<br>
closing the original session , the Openlayers UI shows properly (the<br>
manifest file is working) but the tiles do not show anymore. I am looking to<br>
keep the tiles between sessions.<br>
<br>
Looking at the HTML5 documentation, Web storage, which I understand is what<br>
these functions are using,  has 2 options:<br>
<br>
localStorage - stores data with no expiration date and sessionStorage -<br>
stores data for one session<br>
<br>
The question being, are the cacheWrite/cacheRead functions based on<br>
sessionStorage, that is cached files are stored just fot the active session?<br>
Is there a way to preserve the cached tiles between sessions? I have tested<br>
with both "tileerror" and "tileloadstart" fetchEvents in cacheRead but it<br>
seems to make no difference.<br>
<br>
Thank you<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Offline-Storage-Help-tp5096401p5098461.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Offline-Storage-Help-tp5096401p5098461.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br></div>