Jump to content

show a web page after offline


khadem1386

Recommended Posts

hello

I want my visitor can review my webpage even offline if they visit it allrady

I want my browser first check if internet is connected so renew my web page

and if internet is disconected. browser show a last view of it.

 

I find this metoth if it help me

My webpage is "peage2.html" and contain some file(offline.css offline.js pot.jpg)

 

i set manifest as below

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

and this is my "cache.manifest"

CACHE MANIFEST# MMM2offline.cssoffline.jspot.jpgNETWORK:*

my problem is when i use this method all thing will FREEZ

(even when I conected to internet and I call my page and refrish and f5 or ctrl+F5 but it show the old view.)

note:these files will be freez:

 

1-peage2.html

2-offline.css3-offline.js4-pot.jpg

 

till I change and edite my cache.manifest

 

I haven't prbomlem with freezing and caching these files

offline.cssoffline.jspot.jpg

 

but I need main file ("peage2.html") save and cach only for show and use on offline case

and if I be online browser Renew my peage2.html (it's text and html) by "F5".

 

in normaly case if we be offline and call a webpage , the browser show "can not find server" error or "you are offline" error

 

as you see in "cache.manifest" I don't write the main file name (peage2.html) but it freez too

what can I to do?

 

thank for your time

 

I get pardon for my gramer and diction

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...