2

I am using Chrome to test some of my WebGL texture programs. According to the book 'WebGL Programming Guide', if I need to access files from my local disk, I should add the option --allow-file-access-from-files to Chrome.

How do I do that?

Chong Lip Phang
  • 8,755
  • 5
  • 65
  • 100
  • Modify the shortcut used to start it. I usually find it's better to set up a small local web server though (plenty of e.g. python scripts out there) for more flexibility, and it's much closer to 'reality' in many ways. – sje397 Feb 02 '14 at 06:54
  • I don't get it. When I tried to add the option after chrome.exe, it said the file is not valid. – Chong Lip Phang Feb 02 '14 at 07:04
  • Try quotes, or run from the command line...make sure the additional option is in the 'arguments' field. – sje397 Feb 02 '14 at 10:16

1 Answers1

1

The short answer is DON'T

Open up a shell/terminal/command line and type

cd path/to/htmlfiles
python -m SimpleHTTPServer

Then in your browser to go

http://localhost:8000

If you find it's too slow consider this solution

The reason you don't want to allow file access is allowing it can be used to steal data from your machine. For example, you go to a site and download some webpage. You then view that page locally. With file access on that locally run page can now access all your files AND upload them to a server.

gman
  • 100,619
  • 31
  • 269
  • 393
  • I have not been using python. Must I somehow install python in my local computer first? I know enabling local file access opens a security loophole, but I just want to enable it for a short time and disable it later. – Chong Lip Phang Feb 04 '14 at 00:05