javascript error on chrome :: DOMException: Blocked a frame with origin "https://tpc.googlesyndication.com" from accessing a cross-origin frame. How to over come this situation. Site is available on https protocol. This iframe comming from googleDFP.
Asked
Active
Viewed 3,746 times
-3
-
someone please help to overcome the situation – siddhartha Dec 15 '16 at 14:19
1 Answers
0
This is a CORS (Cross-Origin-Resource-Sharing) protection feature. It prevents your site from simulating button clicks or reading data from the embedded page. The embedded page is logged in, so it could contain sensitive data or buttons controlling state-changing actions.
To stop this from happening, external pages from different origins will not be able to be access each other; unless they say so with their headers (or, if they are subdomains and have set their document.domain
value)
You might want to use a proxy site like https://crossorigin.me (which tends to be down alot). Or you could create your own proxy site. It needs to scrape the page, strip away the bad headers, and give it back.

Max
- 1,325
- 9
- 20
-
-
@siddhartha which is why I put `tends to be down alot`. I'll add another CORS proxy just in case, however – Max Dec 15 '16 at 14:29
-
@siddhartha I could not find any working ones - try making your own if you have the ability to write a serverside script. – Max Dec 15 '16 at 14:32