Running Local JavaScript Files In Chrome

Nov 15, 2011

By Jamison Dance

By default, Google Chrome doesn’t allow you to run JavaScript from your filesystem. This means that if you are testing a JavaScript only app, lots of times you have to throw up a server simply to get around this restriction.

I recently discovered two Chrome command line flags that allow local JavaScript files to run from local HTML files:

--allow-file-access

--allow-file-access-from-files

Now you can test client-side apps without having to start up a server.

Jamison cares about family and programming and React Rally and Soft Skills Engineering and 🏋️ and 🏂 and computing and business and the Dunning-Kreuger effect. He is a real human bean who you can reach on Twitter.