Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed AJAX Basics!
You have completed AJAX Basics!
Preview
Web browsers prevent certain types of AJAX requests, such as requests to other websites. Learn the rules of a web browser's "same-origin" policy and ways to work around these limitations.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
AJAX is normally limited by a web
browser's same origin policy,
0:00
which controls how a JavaScript can
access content from a web server.
0:03
In general, you can use AJAX to
communicate from one page to another on
0:08
the same web server, but
not to access other web servers.
0:12
In other words,
0:16
a web page on your site can't use AJAX
to communicate with someone else's bank.
0:16
And a web page on another
site can't use JavaScript to
0:21
access content on your website.
0:24
For example, say you have AJAX code on
a page located at www.myserver.com.
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up