Ajax Requests and Offline Cache

I am developing an HTML5 application. I cache all files thanks to the .manifest solution, so the application can be used when you do not have Internet access.

I want to synchronize some data with the server whenever possible. Since the navigator.online variable does not seem reliable enough, I make an AJAX request (using jQuery.get()) to determine if I received something in response, that is, the user is online.

The problem is that, as soon as the entire application is cached, every AJAX request to a file on the Internet crashes for no reason. I tried using Chrome, Firefox and Safari (on iPad) with the same result.

I use jQuery.get()to retrieve the contents of some files that are part of the application (and are cached at the same time), these requests work flawlessly.

At first I came across a problem of the same origin. So I tried to make a request to https://graph.facebook.com to see if I was getting anything in return. In the Chrome console, the request status is “Pending”, with 0 bytes received.

When I deactivate the manifest and clear the cache, there is no problem.

Do you have any idea or hint on why this is happening?

Thanks:)

PS: English is not my native language, so please excuse (and feel free to fix) any mistakes I could make. :)

+4
1

, . , - . * , .

CACHE MANIFEST
# 2013-11-21:v1

CACHE:
/Content/Site.css
/Scripts/jquery-1.8.2.js

NETWORK:
*

FALLBACK: 
/ /Home/Offline
+2

All Articles