0

I'm trying to ship a jquery mobile app on a USB stick which is given away to clients. The app is in the app store and should now be made available as a portable offline version.

The JS and HTML itself works fine using the file:// protocol (on double click on index.html) but for navigating between HTML pages I think I need a webserver which is included on the stick. Is there any best practice regarding that? Which server would be best suited? Is there any way to ship the same sticks to Windows & Mac?

urz0r
  • 462
  • 3
  • 8
  • Why would you need a web server to navigate between your pages? If you use relative paths there should be no need for a web server. – webmaster777 Jun 04 '16 at 14:00
  • when i open the app in chrome and try to switch between HTML pages i get: "XMLHttpRequest cannot load file:///path/to/relative.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource." – urz0r Jun 04 '16 at 14:03
  • So the real problem lies within your ajax requests, not with plain url navigation. Then yes, you do need a webserver. or use browser navigation without ajax. – webmaster777 Jun 04 '16 at 14:13
  • Try launching chrome with `--allow-file-access-from-files` flag set, see http://stackoverflow.com/questions/32996001/jquery-load-only-working-in-firefox/ – guest271314 Jun 04 '16 at 14:33

0 Answers0