Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Hemachandra Dewamuni
Hemachandra Dewamuni
6,063 Points

I finished AJAX basic tutorial and I had an error on Chrome such as Cross origin request are only for protocol

It works on Firefox, but not in Chrome

2 Answers

jdh
jdh
12,334 Points

I think this is because you need a server to run AJAX calls where Google Chrome blocks them hence the error whereas, Mozilla Firefox has an internal server in the browser.

Hemachandra Dewamuni
Hemachandra Dewamuni
6,063 Points

Thanks, It works on local server. How could I fix it to work on any browser?

jdh
jdh
12,334 Points

You would have to tie in a server on the backend I suppose.

I'm guessing you downloaded the project files from Treehouse's Workspace?