From 1452d1a1ef66caa2ab584df8e17b1cdad209382d Mon Sep 17 00:00:00 2001 From: Hauke D Date: Tue, 21 Aug 2018 13:08:25 +0200 Subject: [PATCH] Added notes on using WebPerl via file:// URIs --- using.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/using.md b/using.md index 6c80fe3..ef76ed9 100644 --- a/using.md +++ b/using.md @@ -37,8 +37,16 @@ otherwise you may see warnings like "falling back to ArrayBuffer instantiation". For example, in an Apache `.htaccess` file, you can say: `AddType application/wasm .wasm` -Note that opening the files locally (via `file://`) will likely not work -due to browsers' Same-Origin Policy. +Note that opening the files locally (via `file://`) may not work +due to browsers' Same-Origin Policy. However, there are some workarounds: + +* On Linux, the "wasm streaming compile failed: TypeError: Response has unsupported MIME type / +falling back to ArrayBuffer instantiation" warnings can be worked around by +adding the line `application/wasm wasm` to `~/.mime.types` or `/etc/mime.types` +* In Firefox, if your files reside in different directories, the same-origin policy can be +made more lax for `file://` URIs by disabling the +[security.fileuri.strict_origin_policy](http://kb.mozillazine.org/Security.fileuri.strict_origin_policy) +option. **But be aware** of the security implications of disabling this option! See also the Emscripten deployment notes at ,