Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17152

Re: eval - how to

From Cezary Tomczyk <cezary.tomczyk@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: eval - how to
Date 2012-11-10 22:54 +0100
Organization Aioe.org NNTP Server
Message-ID <k7mieq$f4l$1@speranza.aioe.org> (permalink)
References (4 earlier) <28208070.qZZrvzLHK0@PointedEars.de> <k7lhbv$s7q$1@speranza.aioe.org> <4351338.UcPtXxdYxD@PointedEars.de> <k7lk58$3m1$1@speranza.aioe.org> <1870325.DxoWjsJ0Ul@PointedEars.de>

Show all headers | View raw


W dniu 2012-11-10 20:50, Thomas 'PointedEars' Lahn pisze:
> Cezary Tomczyk wrote:
>
>> W dniu 2012-11-10 13:55, Thomas 'PointedEars' Lahn pisze:
>>> Cezary Tomczyk wrote:
>>>> W dniu 2012-11-10 11:36, Thomas 'PointedEars' Lahn pisze:
>>>>> Asen Bozhilov wrote:
>>>>>> Obviously the JSON string comes from your server, otherwise the AJAX
>>>>>> call would fail to fetch the string duo to cross domain policy.
>>>>>
>>>>> First of all, it is the Same Origin Policy (SOP; *origin*, i. e.
>>>>> protocol, host, and port number must match).  That aside, this argument
>>>>> is no longer sound.  XHR can be made cross-domain if the target domain
>>>>> allows it.
>>>>>
>>>>> <http://en.wikipedia.org/wiki/Same_origin_policy>
>>>>
>>>> While CORS (Cross-Origin Resource Sharing) is implemented in most
>>>> browsers then IE8 and IE9 do not support it. Source:
>>>> http://caniuse.com/#search=cors
>> […]
>>>> The workaround is to use iframe for them, right?
>>>
>>> Not necessarily.
>>
>> Well, then what to use for IE7? When not iframe.
>
> You can use a transparent proxy with or without a JSONP-like approach for
> cross-domain requests in all user agents that would parse the content of new
> `script' elements, including Internet Explorer before version 10 (perhaps
> down to version 4 inclusive; proper tests are pending), without iframes.
> The advantage of JSONP is that you can be sure the data is loaded when the
> callback is called.

Makes sense. Now I need to read more about possible security issues. 
Just in any case.

> BTW, iframe cross-domain scripting requires a proper `X-Frame-Options'
> response header field value in case document.domain is not applicable.

Which mostly should not be a problem to set this header.

-- 
Cezary Tomczyk
http://www.ctomczyk.pl/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-09 12:47 +0100
  Re: eval - how to Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-09 05:53 -0800
    Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-09 22:28 +0100
      Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-10 10:23 +0100
      Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-10 11:15 +0100
        Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-11 00:35 +0100
          Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-11 20:34 +0100
    Re: eval - how to Dr J R Stockton <reply1245@merlyn.demon.co.uk.invalid> - 2012-11-10 22:42 +0000
  Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-09 17:46 +0100
    Re: eval - how to Tim Streater <timstreater@greenbee.net> - 2012-11-09 17:00 +0000
      Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-09 18:19 +0100
    Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-09 22:49 +0100
      Re: eval - how to Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-09 16:40 -0800
        Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-10 11:36 +0100
          Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-10 13:29 +0100
            Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-10 13:55 +0100
              Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-10 14:17 +0100
                Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-10 20:50 +0100
                Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-10 22:54 +0100
                Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-11 15:22 +0100
                Re: eval - how to Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-11-11 16:24 +0100
                Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-11 19:23 +0100
          Re: eval - how to Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-11 10:40 -0800
            Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-11 20:41 +0100
              Re: eval - how to Asen Bozhilov <asen.bozhilov@gmail.com> - 2012-11-11 13:34 -0800
                Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-11 23:03 +0100
      Re: eval - how to Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-10 10:21 +0100
  Re: eval - how to SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-10 04:16 +0100

csiph-web