1

I have created a website with html5 appcache, when the page loads at first time, it loads properly and page displays by caching all that I've mentioned in appcache, but when I reload the page, it doesn't loads scripts and css files I have written in appcache, how can I solve this, I'm giving the console screen shot here

First Loading enter image description here

Second loading enter image description here

HTML

cache export

<!DOCTYPE html>
<html manifest="shaj.appcache">

shaj.appcache

CACHE MANIFEST

    Default.aspx
    contact.aspx
    css/bootstrap.min.css
    css/style.css
    js/jquery.animsition.min.js
    js/script.js
    img/logo.png
    img/img-2.png
    img/img-1.png
    img/overlay.png

can any one tell me what is going wrong here ?

1 Answer 1

1

You need to either:

1) Reference the other files in your application cache

CACHE MANIFEST

css/animsition.min.css
css/animate.css
js/jquery-2.1.3.min.js
js/wow.min.js
js/bootstrap.min.js
Default.aspx
contact.aspx
css/bootstrap.min.css
css/style.css
js/jquery.animsition.min.js
js/script.js
img/logo.png
img/img-2.png
img/img-1.png
img/overlay.png

or

2) Allow other resources to be retrieved from the network using the NETWORK directive like

#All other resources require the user to be online.
NETWORK:
*

See http://www.html5rocks.com/en/tutorials/appcache/beginner/ for a great writeup on using Application Cache

Sign up to request clarification or add additional context in comments.

2 Comments

I have got the answer before, anyway thanx for the help, and can you please tell me what is cache fallback ?
Fallback is for when your app is offline and can't access resources. Lets say you had a "News Reader" type app and you'd cached all the app resources (background image, logo image, stylesheets, javascript) to reduce the load time. When the user is offline and tries to load the "News" content, it wouldn't work. This is where fallback and be used to instead show a pretty page of "You are currently offline. Please connect....." instead of a 404 error window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.