0

I have an offline 'redirector' script. Basically a page that has javascript window.location = 'xx' to redirect me to my correct location depending on cookies.

The problem is the manifest will not download and cache if the redirect is too soon (hence canceling the appcache download). So i've thrown in a delay there.

Obviously people have different internet connection speeds so is there a way to say when the manifest is loaded then execute this javascript (a callback or event) or something??

1
  • I had a body onload=javascriptevent() however the html cache didnt download either Commented Feb 22, 2012 at 7:10

1 Answer 1

1

Use applicationCache.oncached:

applicationCache.oncached = function (e) {
    location.href = "xx";
};
Sign up to request clarification or add additional context in comments.

Comments

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.