Here's the situation: there is a site, and it belongs to the client, so it's not on my domain, lets say client.com
.
On this site there is an iframe
, the source of this iframe
is a simple js code, which loads another js (client.js
) - this code is on my domain.
What I need to do is to get the exact url of the page where the iframe is. So now I'm trying to fugure out the difference between document.referrer
and window.parent.location.href
with no luck.
Both give me exactly what I need, but I can't realize what is more reliable? Is there a situation, where one will work and another won't?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…