jqueryhtmlcachingofflineoffline-browsing

Is it OK to include external files in cache-manifest?


I'm building an offline web application and want to use cache-manifest. Currently my cache-manifest looks like this:

CACHE MANIFEST
# Change the version number below each time we update a resource.
# Rev 1
index.html
photo.html
js/photo.js
css/photo.css
http://code.jquery.com/jquery-1.6.1.min.js
http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js
http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css
http://maps.google.com/maps/api/js?sensor=false&region=GB

Is there any reason not to include external, CDN-hosted jQuery, jQuery Mobile and Google Maps files in the cache-manifest?

I can't think of one, but I thought I would ask those wiser than myself :)


Solution

  • You cant. Cache Manifest will only work for files from same domain. You would need to proxy from your domain if you want to white-list for cross-domain resources.