AJAX, Subdomains, and SSL
问题 I have a site, foo.com, that makes ajax requests to bar.foo.com. Will this work. Also, if foo is a secure connection, https, does bar.foo.com need to be https too? Can these two sites use different certificates? 回答1: With plain-http AJAX: You are talking about doing cross-domain XMLHttpRequest, which is not permitted by browsers. There's a W3C proposal pending to implement this in a secure way in the future (partially implemented by IE8, IIRC), but it's definitely not possible at present.