I have an application that needs to work in offline mode. However, only part of the application needs to work in offline mode.
I handle the inputs and actions from the user well - in that, I let the user know which actions are not available in offline mode.
My problem is with the entries of the cache manifest
Let us say my index.html file looks like this -
<html manifest="/cache.manifest">
<body>
<script src="FirstController.js"></script>
<script src="SecondController.js"></script>
</body>
</html>
Now, I only want FirstController.js
file because only the page that it deals with is required in offline mode. So I specify it in the cache manifest.
This works. However, I noticed that the browser still tries to load the SecondController.js
file.
As a result, my application does not load in IE11. In Google Chrome, I have errors in the console. (this is in offline mode).
How do I tell the browser to ignore SecondController.js
if the application is offline?