Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 12. Ajaxing portlets > Cross-domain Ajax

12.10. Cross-domain Ajax

Cross-domain Ajax refers to a scenario in which an Ajax request is sent from a web page or portal page, downloaded from domain X, to a server that is in domain Y.

Let’s say your web portal’s domain name is www.my-bookportal.com (domain X), and one of the portlets in your web portal needs to asynchronously access a servlet hosted by www.your-bookportal.com (domain Y). You might think that you could easily go ahead and create an XMLHttpRequest object and send an Ajax request to www.your-bookportal.com, but it isn’t so simple. Web browsers limit Ajax requests from a web page or portal page to the server from which the web page or portal page was downloaded. So, in this scenario, you could only send Ajax requests to www.mybookportal.com.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial