I want my web app to know if it's online (to avoid my Google maps functions), so I use Offline.js. I'm trying to access an image from our website, but the web app is not hosted online (it's run locally), so the access is cross-domain. Here is my code in $(document).one('ready',
:
Offline.options = {
checks: {
image: {
url: 'http://www.portalogic.info/Images/portalogic.gif'
},
active: 'image'
}
};
var on_line = Offline.check();
console.log(on_line);
But on_line = undefined
. Why is this? Is there a different way to do this?