[jQuery] Re: Cross domain Ajax without Proxy
I tested it and it works cross-domain with IE7 and FF3. It appears to send the data URL encoded inside the CSS like so: #cr0 { background: red url(http://cssrpc/%3Ch1%3EResult%20from%20CSS %201%3C/h1%3E); } #cr1 { background: blue url(http://cssrpc/%3Cp%3EThis%20is%20lorem%20ipsum %20in%20a%20paragraph%20tag.%20Or%20something.%3C/p%3E); } So the url field is then URL decoded and written to the page. Is this right? Is there a advantage of using CSS files instead of JS files for cross-domain data communication? On Dec 12 2008, 12:31 am, Bil Corry b...@corry.biz wrote: ricardobeat wrote on 12/11/2008 7:06 PM: Hi Bill, it seems that that technique doesn't work for FF3, so it's out, unfortunately. It makes reference to an original prototype that does work with FF3, you can see it work here: http://ydnar.typepad.com/css-rpc/css-rpc.html Although it doesn't actually demonstrate loading anythingcross-domain, so I'm not sure if that would work or not. - Bil
[jQuery] Re: Cross domain Ajax without Proxy
On 12月11日, 上午2時32分, ricardobeat [EMAIL PROTECTED] wrote: I believe you have already answered that to yourself but was hoping for a misteryous miraculous solution right? :) No, there isn't, you'll have to do it server-side. Or if you're not playing with the remote page's content use an iframe. Not related to JavaScript, but is it possible to use other technologies such as Flash or Java Applet? I nevered tried before.
[jQuery] Re: Cross domain Ajax without Proxy
On Dec 10, 5:33 pm, aquaone aqua...@gmail.com wrote: Tangent question: 1. If someone was to add an iframe to a page, would cookies be sent to the page within the iframe? AFAIK cookies are stored an a per-domain basis, so if your iframe page resides in the same domain it has access to the same cookies, and only then. If it is in a different domain, then you'll have to communicate via server requests. If it's all under your control, that shouldn't be a problem. There's also a technique where the page in the iframe set's it's window.name property which can be read by the parent frame, but that can be used only once 'onload'. - ricardo
[jQuery] Re: Cross domain Ajax without Proxy
Flash allows you to set cross-domain policies via a file called crossdomain.xml, see here: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1085.html But that requires access to the server which will provide the data anyway, so you might aswell implement JSON/XML directly avoiding an extra layer of communication. - ricardo On Dec 11, 3:26 pm, howa howac...@gmail.com wrote: On 12月11日, 上午2時32分, ricardobeat ricardob...@gmail.com wrote: I believe you have already answered that to yourself but was hoping for a misteryous miraculous solution right? :) No, there isn't, you'll have to do it server-side. Or if you're not playing with the remote page's content use an iframe. Not related to JavaScript, but is it possible to use other technologies such as Flash or Java Applet? I nevered tried before.
[jQuery] Re: Cross domain Ajax without Proxy
Roy M wrote on 12/10/2008 4:17 AM: Is it possible to get remote contents if page is in another domain, without use of proxy? I haven't used it, but you might be able to use this: CSSHttpRequest (CHR) is a method for cross-domain AJAX using CSS for transport. http://nb.io/hacks/csshttprequest/ - Bil
[jQuery] Re: Cross domain Ajax without Proxy
Hi Bill, it seems that that technique doesn't work for FF3, so it's out, unfortunately. On Dec 11, 6:35 pm, Bil Corry b...@corry.biz wrote: Roy M wrote on 12/10/2008 4:17 AM: Is it possible to get remote contents if page is in another domain, without use of proxy? I haven't used it, but you might be able to use this: CSSHttpRequest (CHR) is a method for cross-domain AJAX using CSS for transport. http://nb.io/hacks/csshttprequest/ - Bil
[jQuery] Re: Cross domain Ajax without Proxy
ricardobeat wrote on 12/11/2008 7:06 PM: Hi Bill, it seems that that technique doesn't work for FF3, so it's out, unfortunately. It makes reference to an original prototype that does work with FF3, you can see it work here: http://ydnar.typepad.com/css-rpc/css-rpc.html Although it doesn't actually demonstrate loading anything cross-domain, so I'm not sure if that would work or not. - Bil
[jQuery] Re: Cross domain Ajax without Proxy
I believe you have already answered that to yourself but was hoping for a misteryous miraculous solution right? :) No, there isn't, you'll have to do it server-side. Or if you're not playing with the remote page's content use an iframe. cheers, - ricardo On Dec 10, 8:17 am, Roy M [EMAIL PROTECTED] wrote: Hello, Is it possible to get remote contents if page is in another domain, without use of proxy? E.g. div id=test/div script type=text/javascript $(#test).load(http://www.google.com;); alert( $(#test).html() ); /script Thanks.
[jQuery] Re: Cross domain Ajax without Proxy
Tangent question: 1. If someone was to add an iframe to a page, would cookies be sent to the page within the iframe? I'm working on an app where we need to scrape content from multiple pages that all use a common login scheme that creates a cookie for a central server, despite the application being different domains. I'm trying to find every solution I can, client and server-side... 2. If cookies are sent, I could theoretically fetch the content of the iframe and send it back to the server, yes? stephen On Wed, Dec 10, 2008 at 10:32, ricardobeat [EMAIL PROTECTED] wrote: I believe you have already answered that to yourself but was hoping for a misteryous miraculous solution right? :) No, there isn't, you'll have to do it server-side. Or if you're not playing with the remote page's content use an iframe. cheers, - ricardo On Dec 10, 8:17 am, Roy M [EMAIL PROTECTED] wrote: Hello, Is it possible to get remote contents if page is in another domain, without use of proxy? E.g. div id=test/div script type=text/javascript $(#test).load(http://www.google.com;); alert( $(#test).html() ); /script Thanks.