0

I'm using the HTML5 appcache, it caches these files:

CACHE MANIFEST

CACHE:
index.html
js/CrosswordController.js
js/CrosswordModel.js
js/CrosswordView.js
js/funcs.js
js/jquery.min.js
css/bootstrap.css
css/bootstrap-grid.css
css/bootstrap-reboot.css
css/style.css

The problem is, whenever it loads from the cache it then attempts to do an AJAX get request to get info from the server. The request fails even though the user is online.

The request is below. The request is done from the CrosswordModel

type: 'GET',
            url: '/getGame',
            dataType: 'json',
            data: {
                name: crosswordName
            },
            success: function (data) {
                console.log(data);
                self.puzzle = data;
                self.clues = JSON.parse(data.jsonArr);
                localStorage.setItem("jsonPuzzle", JSON.stringify(data));
                continueInit();
            },
            error: function (jqXHR, textStatus, errorThrown) {
                console.log(jqXHR, textStatus, errorThrown);

                console.log("DIdn't make it??");
            }

        });

When I remove the appcache or clear my cache, the request works fine. Any ideas on how I can fix this?

1 Answer 1

0

In case anyone stumbles upon this and needs a fix, add this to your cache manifest:

 NETWORK:
*
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.