Jump to content

show a web page after offline


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...