html5 appcache - Run offline web app when user is offline -


i'm making web app run offline. have made offline version. now, want let user know kind of link click go offline page.

how can cache offline page whereas user browsing online pages ??

update:

here code i'm using on online version.

setinterval(function () { if(!navigator.online){ $('.status').html('<a href="offline.html">click here run offline version</a>');  } }, 250); 

and offline.html contains html file , manifest file well.

<html lang="en" manifest="app.manifest"> 

update # 2 got solution myself. have is, put following iframe in online version

<body> <iframe src="http://site.com/index.php/m/m_offline/" width="0" height="0"></iframe> 

it cache offline version. remember add manifest file in offline version. hope helps else well.

thanks

i got solution myself. have is, put following iframe in online version this

<body> <iframe src="http://site.com/index.php/m/m_offline/" width="0" height="0"></iframe> 

it cache offline version. remember add manifest file in offline version. hope helps else well.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -