I remember reading about domain A being able to control domain B if domain B has a helper frame inside it. I have pages like StumbleUpon, where I place other websites in iframes. What if one of those websites place my page in an iframe? Also, stuff like Facebook’s Like button and Twitter’s Tweet button are all iframes. What data would/woudn’t that have access to?
Would they be able to inject scripts into my page?
I remember reading about domain A being able to control domain B if domain
Share
No, they can not access other domains cookie.
No matter where you hide an iframe with different domain, browser will always send cookies that were set for that specific domain.
Like button can be created utilizing
Refererheader.Say,
http://domainA.com/index.htmlcontainsHere when
http://domainB.com/like.htmlis called inside the iframe an HTTP headerReferer: http://domainA.com/index.htmlis sent along with the request. This waydomainB.com/like.htmlalways knows who is requesting. WhendomainB.comgot this little piece for information it can just check the number of likes of the page and show the result.A live example
Put the bellow code in any of your websites. After that every time you refresh the the website it’ll show how many times its loaded. It’ll count the number of hits.