简体   繁体   English

使引荐来源网址和查询字符串可用于其他域下的框架

[英]Making referrer and querystring available to a frame under a different domain

I need to deal with a website that is just a page with a big frame that loads all the website content. 我需要处理的网站只是一个带有大框架的页面,可以加载所有网站内容。 I can't change this. 我不能改变这个。

<html>
    <!-- this page lives under mydomain.com -->
    <head>
        <title>My Beautiful Website</title>
    </head>
    <frameset rows="100%" border="0" frameborder="0">
        <!-- website actual content is loaded from a subdir of a completely different domain -->
        <frame src="http://mydifferentdomain.com/subdir" name="my-ugly-frame">
    </frameset>
</html>

I need to make the referrer and query string informations of mydomain.com, available to the javascript code that runs inside the frame, so I can understand how people reach this website. 我需要mydomain.com的引用和查询字符串的信息,提供给该框架运行的JavaScript代码,所以我能够理解人们如何到达这个网站。

Is there a way to circumvent cross domain restrictions? 有没有办法避免跨域限制?

Thanks. 谢谢。

Is there a way to circumvent cross domain restrictions? 有没有办法避免跨域限制?

No. The data has to be passed explicitly. 否。必须显式传递数据。

The frameset page could include the data in the query string of the URI used to load the embedded page … but I'm guessing that this is domain hosting for the DNS server deprived and that that isn't an option. 框架集页面中的数据可能包含用于加载嵌入式页面的URI查询字符串中的数据……但是我猜想这是DNS服务器被剥夺的域托管,这不是一个选择。

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

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