polikarpoff / showdown-blog

Automatically exported from code.google.com/p/showdown-blog
1 stars 0 forks source link

XMLHttpRequest cannot load file ***. #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, what am I doing wrong if I have this problem?

1. Just copied your sample to my directory;
2. Opened index.html in Chrome (7.0.517.44);
3. "Please wait" hangs all the time, nothing changes.
4. JS console told me:
"XMLHttpRequest cannot load file:///C:/path/prefs.xml. Origin null is not 
allowed by Access-Control-Allow-Origin."

Windows 7 Ultimate (x86)

--
FMax.

Original issue reported on code.google.com by filimono...@gmail.com on 18 Nov 2010 at 4:16

GoogleCodeExporter commented 8 years ago
The reason is in the restriction of Google Chrome to load local files (it tries 
to match protocols and host for file:/// URL), if you put your files to remote 
site, you can easily access them from Chrome.

Original comment by shaman.sir on 19 Nov 2010 at 6:03

GoogleCodeExporter commented 8 years ago
Start Google Chrome with the --allow-file-access-from-files option and it will 
load OK

Original comment by shaman.sir on 19 Nov 2010 at 6:13

GoogleCodeExporter commented 8 years ago

Original comment by shaman.sir on 19 Nov 2010 at 6:14

GoogleCodeExporter commented 8 years ago
Thanks, now I've got it.
And thanks again for your effort, I've found it very usefull for my needs.

Original comment by filimono...@gmail.com on 19 Nov 2010 at 8:15

GoogleCodeExporter commented 8 years ago
Блин, вот что заставляет двух 
русскоязычных пользователей общаться на 
буржуйском языке без видимых причин? 
Нипанятна ):

Original comment by Mr.UniB...@gmail.com on 8 Dec 2010 at 8:18