Click here to Skip to main content
14,297,720 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello,
I'm creating a website which have 3 main pages ( default.aspx , about.aspx , contact.aspx and the materpage.master ) .
I'm coding via C# based on html5 .
and what i want that in case the user is disconnect he will be able to check the website via offline storage .
I saw alot of example but im not able to do it on my application so any help please.

Thanks In Advance
Regards
Posted
Comments
Amir Mahfoozi 1-Feb-12 9:51am
   
http://www.sitepoint.com/offline-browsing-in-html5-with-applicationcache/
Christian Graus 1-Feb-12 14:04pm
   
You should post what you have tried and explain where you are stuck.
nbeiruty 2-Feb-12 3:37am
   
The problem where i am stuck , is that i did create the offline.appcache and i did link it with the masterpage.page, and when i open the website -> it ask me if i want to save the file and when i press allow , i can c that the data stored for offline is 0kb ? here is the code :


That's the MasterPage
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE HTML >
<!--Notice about Manifest-->
<html manifest="offline.appcache">
<head>
<meta charset="utf-8">

<meta name="viewport" content="width=device-width">
<title>::TelePaty::</title>
<link href="css/desktop.css" rel="stylesheet" type="text/css">
<link href="css/citrus_mq.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]>
<script type="text/javascript" src="javascript/html5.js"></script>
<![endif]-->
<!--[if IE 6]>
<script src="javascript/belatedPNG.js"></script>
<script>
DD_belatedPNG.fix('*');
</script>
<![endif]-->
<link rel="shortcut icon" href="images/logo.ico" />
....
.
.
.
.
.
.
.
.
</div>
</div>
</body>
</html>


offline.appcache :
CACHE MANIFEST

# Created on 2 February 2012
CACHE:
MasterPage.master
Default.aspx
about.aspx
contact.aspx

# Standard Script Libraries

javascript/belatedPNG.js

javascript/html5.js

Scripts/jquery.tmpl.min.js

engine1/wowslider.js

engine1/script.js

engine1/jquery.js

engine1/wowslider.js


# Content (CSS & images)

css/citrus_mq.css
css/desktop.css
css/phone.css
css/tablet.css
css/test.css
engine1/style.css
engine1/arrows.png
engine1/bullet.png
engine1/triangle.png
engine1/arrows.png

images/backgroundsite.jpg
images/flash.png
images/flash1.png
images/testimonials.jpg
images/sml_logo.png
images/slogan.png
images/References.jpg
images/partners.jpg
images/Operating-the-Global-Business-Candy.jpg
images/med_logo.png
images/med_hero.jpg
images/lrg_logo.png
images/lrg_hero.jpg
images/logofooter.png
images/logo.png
images/Logo.ico
images/logo.gif
images/h22.gif
images/footer3.png
images/footer2.png
images/footer1.png
images/flash3-1.png
images/flash2.png


NETWORK:
MasterPage.master
default.aspx
about.aspx
contact.aspx

FALLBACK:
MasterPage.master
default.aspx
about.aspx
contact.aspx



Thank You In Advance.
BillWoodruff 3-Feb-12 1:18am
   
Start here: http://stackoverflow.com/search?q=html5+storage

Google is your friend ?

http://www.google.co.th/search?aq=f&sourceid=chrome&ie=UTF-8&q=html5+offline+storage

You may wish to compare the article Amir linked to (which was also on my mind) with this August, 2011, CP article: http://www.codeproject.com/Articles/240409/Picking-a-Web-Client-Side-Persistence-Mechanism.aspx

For up-to-date stats on browser implementations of HTML5 offline:

http://caniuse.com/#feat=offline-apps

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100