简体   繁体   English

获取 iframe (来自不同域) URL 参数

[英]Get iframe (from different domain) URL params

I have and iframe (from different domain) on my site and would like to get it's URL params.我的网站上有 iframe(来自不同的域),并希望获得它的 URL 参数。 For security reasons I was unable to get it (I don't own the iframe domain).出于安全原因,我无法获得它(我不拥有 iframe 域)。

Does someone know a way around this?有人知道解决这个问题的方法吗? I just need the URL params to send the information to Google Anlytics.我只需要 URL 参数将信息发送到 Google Anlytics。

Best, Anna最好的,安娜

This is not possible, unless you control both domains;这是不可能的,除非您同时控制两个域; in which case you could just have the iframe contents tell Google Analytics (or your own API) what the GET params are.在这种情况下,您可以让 iframe 内容告诉 Google Analytics(或您自己的 API)GET 参数是什么。

Otherwise, you are asking for a way to circumvent browser security features, and there isn't one (or rather, there isn't one that anyone would be willing to share, or has been found yet).否则,您正在寻求一种绕过浏览器安全功能的方法,但没有一种方法(或者更确切地说,没有任何人愿意分享,或者尚未找到)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM