javascript - retrieving cached pages -


i have simple website created using javascript , jquery. website contains 4 web pages , hosted on web server. issue want able navigate through these 4 pages when don't have access server (no wifi or otherwise). way i'm linking pages (if has effect) using

window.location.href="page1.html"; 

the click function 1 of buttons on home page so

    $("#btnone").click(function() { window.location.href="page1.html"; return false;    }); 

i thought of using post on jquery website says "pages fetched post never cached"

is there effective way accomplish want; having pages cached browser available use offline?

    cache manifest  # 01-aug-13 215  cache:  css/stylesheet.css css/custom-theme/jquery.mobile-1.3.2.min.css home.html page1.html page2.html js/jquery-1.9.1.min.js       <!doctype html> <html manifest="cache.manifest"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="css/stylesheet.css"/>  </head> 

sounds want html5 appcache:

<html manifest="example.appcache">   ... </html> 

which lets specify manifest site , dictate pages should cached etc.

in manifest file indicate resources want cached...

cache manifest # v1 2011-08-14 # comment index.html cache.html style.css image1.png  # use network if available network: network.html  # fallback content fallback: / fallback.html 

there's great detailed information on over html5 rocks technical gotchas might run into.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -