Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

So I'm in the middle of a website which has to be accessible offline. To do so I'm using the appcache html5 feature. Everything works pretty good, my website is all cached without any problem.

I have a little issue though, and I don't know if it is possible.

Let's say I've cached a page called exemple.html. In this page I have two images image1.jpg, and image2.jpg. And in the html tag of this page I've added the attribute manifest linking to a manifest with only image1.jpg as an explicit ressource to cache.

The first time I'll go to this page, the browser will download exemple.html and image1.jpg, but not image2.jpg.

If I'll go back on the same page when I'm offline, the result will be expected : my page loads, I can see image1.jpg but not image2.jpg. So this is not a problem.

The issue is, when I go to my page while online, then the result is the same as if I were offline.

Basically what I would want is that if a ressource is not found in the cache, that the browsers go and try to find it online.

I've thought about the possibility to use the NETWORK section, but this would imply that it will first check online for these. I really would like the browser first to check if it is in the appcache, and if it's not, then to check online. I would expect it the logical thing to do in fact.

I don't know if you understood my question. Let me know If i can be clearer.

Thanks !

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.