If you create an executable of your game for HTML5 and then try to run the game in your browser by double-clicking the index.html file produced, then you will get a warning similar to the one shown below:
You get this warning as local testing is not the correct way to test your game or to pass it around to other people.
Why is this?
Browsers will fail to load assets or run your game because of cross-site scripting, often shortened to XSS, which is a protection system within the browser designed to block a website's code affecting a local machine negatively. If the html file is local, it will be very strict with the protection. Typically, this will result in your game assets failing to load and possibly your game code being ignored also, leading to crashes (however, the major browsers do differ in how strict they enforce this).
If you would like to read up on the details of XSS, start here: http://en.wikipedia.org/wiki/Cross-site_scripting
How do I test my exported game correctly?
The obvious answer is to upload the game to your web server and test it there (you can find out how to do this from the article here), but if you want a way of testing files privately or you don't have access to your FTP where you are, etc., then you should look into setting up a local web server application, such as WAMP or XAMPP. These will allow you to designate a folder on your machine which will then work with the software to mimic a webhost. You would then choose this folder when doing Create Executable in GM and the files would be ready for you to test with.
Now, assuming that you left your html output name as the default of "index.html", simply typing "localhost" (without the quotes) in your web browser address bar will then present you with your game, as this way the browser is able to perform all of the XSS checks it wants to and can verify that your webpage is safe to run properly. You will also be able to do this easily using the system tray icon which WAMP/XAMPP give you.
One warning: If you use Skype it has a setting "Use port 80 and 433 as alternatives for incoming connections" in Options > Advanced > Connection. If this is enabled it will block WAMP from starting up fully (unaware if this affects XAMPP also).
One simple alternative to WAMP/XAMPP, if you already have Python installed is to run the built-in http.server() to host your HTML5 game in the browser.
First, package your Game as 'loose files' with 'Create Executable':
For this example, they were saved to C:\srv\Game_test :
Open a command prompt with Win + R and type 'cmd.exe'. When your command prompt opens navigate to the directory where you saved your Game:
Start a python webserver in the directory where you saved the loose files earlier:
Windows:
python -m http.server 8000
Mac/Linux:
python3 -m http.server 8000
In your preferred web browser navigate to http://localhost:8000/ and observe your game starts!
When you're done, use 'Ctrl + C' to close the session on your simple HTTP server. Ensure you see 'Keyboard interrupt received, exiting.' and close the cmd window:
Per the Python documentation: Warning: http.server is not recommended for production. It only implements basic security checks. As such - this should only ever be used for testing your game and not for wider distribution.
Please follow through your chosen web server's documentation as to how to set it up.