Cannot open local file – Chrome: Not allowed to load local resource


Test browser:
Version of Chrome: 52.0.2743.116

It is a simple javascript that is to open an image file from local like ‘C:02.jpg’

function run(){

   var URL = "file:///C:02.jpg";, null);


Here is my sample code.

Please give me any suitable suggestions.


We use Chrome a lot in the classroom and it is a must to working with local files.

What we have been using is "Web Server for Chrome". You start it up, choose the folder wishing to work with and go to URL (like you chose)

It is a simple server and cannot use PHP but for simple work, might be your solution:


Leave a Reply

Your email address will not be published. Required fields are marked *