HTML5 on cd-rom

Hello there,

I would like to put a version of my app on a cd-rom for a client. Of course, viewing html5 openfl apps locally generates the following error for fonts and xml :

XMLHttpRequest cannot load file… Cross origin requests are only supported for protocol schemes: http, data, browser, chrome-extension, https, chrome-extension-resource.

So I’m not sure on how to do this neither if these following methods work…

  1. disable browser security but the client will refuse for sure
  2. download fonts and xml from online. Is it working?
  3. copy xml in a .hx file and use default fonts from the client computer.
  4. embed a webserver in the cd-rom and create a batch file to open the app with the webserver. Is it possible anyway?

Have you experienced similar issues? How can I resolve this.


4 should be possible, it’s what lime run html5 does,
it launches and opens the url.

Thanks for your comment but unless this doesn’t need an install, I’m afraid I can’t use http-server.
It’s important to make it working like a standalone.

Maybe I can use this instead :
I’ll try thanks :slight_smile:

Maybe you could do something with [Electron] ( ?

I don’t think you need, the tools ship with the node executable and the http-server next to it and doesn’t install them to your system.

Ok I’ll try, thx for the clarification.
I’ve just tried with usbwebserver and my html5 app is running :slight_smile:
I have a firewall alert but it seems to work anyway.