0

I'm building a mobile application with html5 and javascript. I have json data in js file. I will host that data file on my online server to update the data daily but I want my application to use the local file when there is no internet connection available too.

Thank you

Daina Hodges
  • 823
  • 3
  • 12
  • 37
  • See: http://stackoverflow.com/questions/2384167/check-if-internet-connection-exists-with-javascript?lq=1 Essentially, if Ajax fails, assume connection went offline, then load alternate local source. – noahnu Jan 26 '16 at 20:45
  • Thank you @noahnu Now when I use the online data file the application does not work, it works only when I use the local file. – Daina Hodges Jan 27 '16 at 21:30
  • Post that as a question w/ a snippet of your code plus any errors you get (i.e. from developer console). – noahnu Jan 28 '16 at 02:23

0 Answers0