0

OK so, i've been stuck for a long time now on this. I've read all the other quetions and comments about this but i haven't got any further...

I am working on a JavaScript project in Aptana Stundio 3. When i open my index.html file in my main folder i get this:

Cross-origin image load denied by Cross-Origin Resource Sharing policy. (Using the latest version of Chrome)

But only if i open the html file in my folder. When i run it on Apanta, it works just fine.

My project is never going to run on any server... It's just a game that i want to share with other people, but on their localhost.

I've read things about CORS and stuff but i just don't get it. I know i have to change the header of my file so that i can get access to my sources, but i dont know HOW?!

What do i do? Not in general, but in my case.

Hope i get this soon.

Fullk33
  • 230
  • 2
  • 9

1 Answers1

0

In most browsers, security settings prevent pages running from the file system from using JavaScript to access other files on the file system. This is a good defence against attacks based around emailing an HTML document as an attachment to a victim.

If you want to access other files, then access all of them over HTTP.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335