Bob Fludder
Posts: 0
Joined: Fri Sep 14, 2012 1:09 am

How to test if a resource not loaded

I had to do a bit of searching the the files but I have found that some built-in resources refer to external web sites to download the javascript/css. I can understand this as you'll get the latest versions each time. However, if the app is started and has no internet connections available (ie off-line) and because of this I'm not sure about jquery mobile. It has a lot of http references in it so I'm not sure whether all the code/css is being loaded and therefore how this will affect the operation of the app. Is there a way of being able to test/check what has loaded ? or a version that is fully included in the app (no external sources) ? I'm now able to test for connectivity but plan on developing a full off-line mode and it's no point if it can't work that way.
Thanks

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How to test if a resource not loaded

Hi Bob -

Please clarify, is your app is a web app or hybrid app on the device?

I'm afraid that this way the web apps works, upon DOM initialization you will need to deliver JS framework files and CSS files, before the page will be loaded.

Usually this is all done by content delivery networks or another way is your own server.

To check if the jQuery has been loaded on the page, you can use simple checking, like for example here: http://stackoverflow.com/questions/73... -- or search in the internet another solutions.

Bob Fludder
Posts: 0
Joined: Fri Sep 14, 2012 1:09 am

How to test if a resource not loaded

G'day Illya,

Its a hybrid app on the device so do I need to do a check for jQuery? If so when ? on device ready ? or does it download "stuff" as it's needed ?

I did do quite a bit of googling before asking (always try to find myself) but as you know it depends on using the right words in the search. Sometimes I get lucky - other times I ask you guys :-)

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to test if a resource not loaded

Hi Bob,

By default all sources(except of DB services) available locally(from your installed binary app).

So jQuery and JQM and all JS assets - will be loaded locally (even when your devices will not have network connection).

But if you have any network-depended sources you need to check them before use.

Regards

Return to “Issues”