I've successfully created a very simple HTML page that performs a MetaMask connection to my website when I click a button. Metamask pops-up when I click the button and the connection happens without a problem.
The tutorial I've followed to do this starts by running "python3 -m http.server", which starts up a HTTP server locally. If I don't run that command then the webpage fails to detect window.ethereum and Metamask will ignore any requests, can anyone explain to me the logic behind that? Why do I need to run a HTTP server in order for the Metamask extension to work, and why won't it run when in file mode?