[Ethereum] Using metamask from a local html file

metamask

I'm building a DAPP it works fine when I host it from a server, but when the HTML file is local MetaMask gives this error:

MetaMask does not allow file:// protocol, use http(s)://

Any ideas what that means or if theres a way to get it to work?
Thanks!

Best Answer

It's a browser security related thing, more can be found here.

The main excerpt:

Http(s) - Web Server Required

Due to browser security restrictions, we can't communicate with dapps running on file://. Please use a local server for development.

You have to start a local web server and access your HTML file from it.

Related Topic