Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Javascript cross domain security work around for Safari when using XMLHttpRequest



We are writing javascript code within a web page which needs to call
web service methods which reside on a different domain then the domain
the page was loaded from.  We are using the XMLHttpRequest object to
do this.  This is a known security violation because Javascript does
not let you talk across domains.  The FireFox browser however lets you
get around this by either digitally signing the javascript, or by
disabling one of their security parameters in the browser.  We would
like this code to run in Safari on OS X, but are unable to get around
the cross domain security in Safari.  As far as I can tell, not even
digitally signing the javascript will make this work in Safari.

The javascript code works flawlessly when the web service and the html
page are loaded from the same domain.  Once you separate the web
service to another domain, the Safari browser does nothing when the
javascript calls the web service methods.  Unfortunately, it is not
possible to have both the html page and web service hosted on the same
domain for our situation.

We would really prefer to use the Safari browser for this application
because it handles ICC profiles nicely, and supports the
XMLHttpRequest object cleanly.  Any information regarding how to make
t his work in Safari would be greatly appreciated.

Thanks ....Ryan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webcore-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webcore-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.