Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

html

jquery

ajax

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.

like image 855
Marc Avatar asked Mar 24 '12 19:03

Marc


1 Answers

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:
*
like image 95
Koen Avatar answered Oct 24 '22 13:10

Koen