Why does JavaScript work when testing a webpage locally, but not once it is uploaded on the server?

so I’m building a voice recorder using JavaScript, and the voice recording works just fine when I run the .html with the script locally, however as soon as I upload it to the server, the .html page displays just fine, but the script no longer works – as in when the button is clicked, there is no prompt to get user’s microphone permission or anything.

The webpage I hosted the recorder is notfungi.com.

Appreciate any help!

31 thoughts on “Why does JavaScript work when testing a webpage locally, but not once it is uploaded on the server?”

Leave a Comment