Marc
Marc

Reputation: 14295

When adding an HTML5 manifest all my jQuery (mobile) AJAX requests fail with status 0

I have a working jQuery mobile application which does some simple $.ajax requests for static .json files. All is well until I add a manifest: merely changing <html> to <html manifest="myapp.appcache"> breaks my ajax! Here's my manifest:

CACHE MANIFEST

CACHE:
jquery.mobile-1.0.1.css
images/ajax-loader.png
images/icons-18-white.png
jquery-1.6.4.js
jquery.mobile-1.0.1.js

I've tried adding:

NETWORK:
salesorg.*.json

Makes no difference. Serious de ja vu here but I don't know what the solution was.

Upvotes: 11

Views: 582

Answers (1)

Koen
Koen

Reputation: 140

Create a ".htaccess" file and insert:

AddType text/cache-manifest .appcache

The myapp.appcache file:

CACHE MANIFEST

CACHE:
jquery.mobile-1.0.1.css
images/ajax-loader.png
images/icons-18-white.png
jquery-1.6.4.js
jquery.mobile-1.0.1.js

NETWORK:
*

Upvotes: 1

Related Questions