When you’re building a JavaScript app, that doesn’t (yet) need any backend processing, you might be urged to just double click your test.html and see if it works. But Chrome has some security features that can stand in your way. Issues can arise, if for example, you have the JavaScript files in sub folders, or if you’re linking to Google’s copy of jQuery. So what I did was create a shortcut to Chrome on the desktop, and added flags to it so that Chrome would open without these security features enabled. You of course would only want to use this opened instance of Chrome for testing, which is why I named my Shortcut “Insecure Chrome”.
Start by right clicking the Chrome shortcut in your Start menu, and right click on it. Choose Send to > Desktop (create shortcut). You’ll want to right click and choose Properties on your new shortcut. The two flags you want to add are –allow-file-access-from-files and –disable-web-security. You will add them to the Target field, after the .exe part. Your path to Chrome may look different, but it should look something like:
C:\Users\Owner\AppData\Local\Google\Chrome\Application\chrome.exe --allow-file-access-from-files --disable-web-security
And there you have it. When you’re testing local web development code, use this instance of Chrome instead of normal Chrome.