Another method is to use HTML5's Application Cache to download all files once and keep them in the browser's cache. The above link contains much more information. The following information is from the article:
Change your <html>
tag to include a manifest
attribute:
<html manifest="http://www.example.com/example.mf">
A manifest file must be served with the mime-type text/cache-manifest
.
A simple manifest looks something like this:
CACHE MANIFEST
index.html
stylesheet.css
images/logo.png
scripts/main.js
http://cdn.example.com/scripts/main.js
Once an application is offline it remains cached until one of the following happens: