views:

39

answers:

2

Hi guys,

The scenario is this:

At the moment this is not working. I suspect that the subdomain is breaking a x-browser restriction. Any ideas?

It is working locally when the html page and the webservice are running off my localhost.

Cheers.

A: 

Can you do a JSONP service, or use .NET as a proxy?

Otherwise you are not conforming to same origin policy.

alex
+1  A: 

In the same origin policy, the host must match exactly (so must the protocol and port, but that's an aside). If a matching suffix could suffice, foo.com would be deemed the "same origin" as bar.com, or fie.co.uk the same as flap.co.uk, etc, completely destroying the purpose of the policy.

I realize you think of www.blah.com as "more related" to whatever.blah.com than the examples I gave, but that's simply not the case - think of all the myriads of something.appspot.com domains running Google App Engine apps from myriads of different authors with absolutely no relationship among them, for example.

Alex Martelli
I think the user understands this concept...I don't believe comprehension is the issue, he's simply looking for a viable work-around to it.
Nick Craver
Or think about any .co.uk or .com.au adress.
Michael Stum