Why does placing a JavaScript pixel within an iFrame make the JavaScript pixel more secure?
-
I understand that advertisers are often concerned about javascript pixels, because JavaScript pixels can make numerous calls. Why does putting it into an iFrame make it more secure? Can't JavaScript being run within an iFrame affect the host page?
-
Answer:
If pixels are served from an iFrame from a different host, then the HTTP referrer header sent along with the pixel request is the URL of the iFrame, not the URL of the page. At TellApart, we drop third party ad network pixels on our partner sites who are e-commerce retailers. Some retailers are concerned about not leaking information about their traffic pattern to third party ad networks. By dropping pixels from an hidden iFrame served from a http://tellapart.com domain, all we leak to the ad network is the http://tellapart.com domain, not the merchant's domain.
Mike Cui at Quora Visit the source
Other answers
The host page can only reference internal state via javascript in an iFrame or vice versa if both are from the same domain. If they are different domains (e.g one is an advertiser's domain), then the two cannot access each other's state. See this article http://softwareas.com/cross-domain-communication-with-iframes for a good description of the security limitations.
John Friend
Related Q & A:
- How to cancel a file upload using an iframe?Best solution by Stack Overflow
- Why does Parse use Javascript?Best solution by Stack Overflow
- How to access a nested function from another nested function in javascript?Best solution by devarticles.com
- How to properly end a javascript statement?Best solution by w3schools.com
- What is John Lewis' policy when returning an LCD with a dead pixel?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.