cross-domain

What exactly can an IFrame do with the top.Location object (cross-domain)?

左心房为你撑大大i 提交于 2019-12-20 09:53:53
问题 There is a very particular edge case in cross-domain policies regarding the window.top.Location object... Let's say I have IFrame A , in domain www.bbb.com, living inside a page in domain www.aaa.com. The page inside the IFrame can: Compare window.top.location to window.location (to detect whether it's being framed) Call window.top.location.replace(window.location) to redirect to self Call window.top.location.replace("any arbitrary string") to redirect somewhere else But it cannot: Alert,

document.write in jsonp callback

£可爱£侵袭症+ 提交于 2019-12-20 05:53:25
问题 I am making a cross domain request using script tag hack and jsonp. In the callback function, I want to write the data received to DOM using document.write(). I know that I should use appendChild/innerHTML instead of doc.write(). My constraint is I do not have a class/id hook to the element I want to write to. I can only rely on document.write() to write "in place". Following code is included in HTML div in a script tag.: function request_jsonp(){ var script = document.createElement('script')

Making crossdomain ajax requests with addons for Firefox

五迷三道 提交于 2019-12-20 05:37:13
问题 I'm a bit confused about how you can or cannot make crossdomain ajax requests in addons for Firefox. Addons such as LastPass and Xmarks suggest you can do it, however when I try to google how you do it, everyone seem to say you cannot, unless the user has set a preference in the settings of Firefox. If crossdomain isn't possible, then how do Xmarks, LastPass and other addons handle the communication with theirs respective servers? 回答1: You most definitely can make cross-domain XMLHttpRequest

Cross Domain Request and JQuery

雨燕双飞 提交于 2019-12-20 04:10:40
问题 Im trying to make a cross domain request to a web service via jquery using $.getJSON() and it works fine! However, when I try to make the same request in Internet Explorer 7 or 8 the request is never sent. Anyone have any ideas? 回答1: JSONP is here for this purpose. Check the JSONP section in getJSON jQuery documentation. 回答2: IE explicitly blocks cross domain requests. Better to use a cross domain proxy on your server for better results! Some documentation: http://ajaxpatterns.org/Cross

How to use PHP CURL to bypass cross domain

穿精又带淫゛_ 提交于 2019-12-20 03:33:11
问题 I need PHP to submit paramaters from one domain to another. JavaScript is not an option for my situation. I'm now trying to use CURL with PHP, but have not been successful in bypassing the cross domain. From domain_A, I have a page with the following PHP with CURL script: if (_iscurl()){ echo "<p>CURL is enabled</p>"; $url = "http://domain_B/process.php?id=123&amt=100&jsonp=?"; $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); curl_setopt($ch

CDN Cname Cross domain issue in jwplayer caption

与世无争的帅哥 提交于 2019-12-20 03:31:18
问题 I am using Jwplayer 6.8 and having my jwplayer setup in some server www.example.com.I am loading subtitles in vtt format from CDN d2cdnserver.cloudfront.com( cname - example.amazon.com, I am loading my subtitle using cname ) , It is throwing cross domain error. Source Link : Jwplayer crossdomain Issue I have to added response header in server end, in httpd.conf , php.ini and htaccess file but it does not seems to work. I was accessing my files through cname example.amazon.com, When I change

What is the Same-Origin Policy for File URIs?

自作多情 提交于 2019-12-20 02:26:06
问题 Perhaps my Google-Fu has deserted me, but I can't find a good description of the same-origin policy for file URIs other than this outdated Mozilla page. Can anyone point me to an explanation of the same-origin policy for file URIs? In particular, if I have a script loaded from (say) file:///C:/Users/Joe/Test/test.html, what files is that script allowed to access using XMLHttpRequest? And how should I specify the URI, i.e., as relative to the script's URI? Note that I'm not asking for a way to

HTTP 302 redirects between servers failing in IE, working in FF and chrome

£可爱£侵袭症+ 提交于 2019-12-20 01:44:11
问题 I'm getting a blank white screen in IE when building a login system that redirects through a 3rd party server for authentication. (The browser is supposedly requesting a page back on my server when it fails.) The login goes like this: user requests http://www.myserver.com/ and is returned a 302 redirect to http://www.myserver.com/login.aspx along with some cookies storing any GET/POST parameters in the initial request and the initial URL. user's browser requests http://www.myserver.com/login

How can I setup reverse proxy on IIS, allowing cross-host communciation between host1.mydomain.com and host2.mydomain.com?

喜你入骨 提交于 2019-12-19 17:28:31
问题 I have a page at host1.mydomain.com/page_from_host1.jsp and an HTML page at host2.mydomain.com/page_from_host2.html. host1 is an IIS7/Tomcat box and host2 is an IIS7 box. I want to allow the first page to submit a form, which displays the second page, and the URL does not change. That is, the URL is host1.mydomain.com/page_rom_host2.jsp, but the contents of the page are from host2.mydomain.com/page_from_host2.html. I would imagine I can setup a reverse proxy on IIS to accomplish this, similar

How can I setup reverse proxy on IIS, allowing cross-host communciation between host1.mydomain.com and host2.mydomain.com?

♀尐吖头ヾ 提交于 2019-12-19 17:28:10
问题 I have a page at host1.mydomain.com/page_from_host1.jsp and an HTML page at host2.mydomain.com/page_from_host2.html. host1 is an IIS7/Tomcat box and host2 is an IIS7 box. I want to allow the first page to submit a form, which displays the second page, and the URL does not change. That is, the URL is host1.mydomain.com/page_rom_host2.jsp, but the contents of the page are from host2.mydomain.com/page_from_host2.html. I would imagine I can setup a reverse proxy on IIS to accomplish this, similar