Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

for the two hosts

http://1.com.local/
http://2.com.local:8080/

how can I use document.domain to enable DOM-Manipulation between the two? If i set both to com.local it doesn't work, because the 2nd host then gets the domain com.local:8080.

When I try to set the domain of the first one to com.local:8080 manually, the port is just snipped of and the domain remains com.local.

How can I enable DOM-Manipulation in this situation?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
148 views
Welcome To Ask or Share your Answers For Others

1 Answer

You cannot. Sorry - same origin is including the ports

You can use CORS and ajax to copy some stuff from one server to the other if you enable this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...