CEF browser - how to allow cross origin requests using the file:// protocol?

Ralf Bitter rabit at revigniter.com
Fri Jul 11 07:36:28 EDT 2014

As you might know the new CEF browser doesn't support
access to local files (file://) using XMLHttpRequest.
Of course, JSONP would be a solution but not in my
special case.

I need to display local Keynote presentations (exported to HTML).
Keynote uses JSONP in case the protocol is file://. So, this
works with CEF. But there is one problem:
There is an annoying flicker on slide transitions. Same problem
with Chrome, this is nothing special with CEF in LiveCode and this
does not depend on the kind of transition.

Now, if you use a server and http://, Keynote uses Ajax and transitions
work fine. This means I need to remove the JSONP option and
tell the CEF browser somehow to allow cross origin requests
using the file:// protocol. With Chrome this can be achieved by using
a -–allow-file-access-from-files command line switch.

Does anybody know how to set this flag for the CEF browser
in LiveCode?


More information about the Use-livecode mailing list