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:



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

Jamison Dance enjoys kittens, making computers smarter and the magic of children's laughter. He tweets at @jergason and GitHubs as jergason. He also podcasts on JavaScript Jabber and Soft Skills Engineering.