This question already has an answer here:
I understand that this error can not be overcome.
But what I would like to do is that when I encounter a page that can't be embed instead the page simply loads as a pop up. What is currently happening is that I am being redirected to the page.
I see the following error in chrome for pages that are unable to be embedded.
Refused to display 'http://www.nokia.com/us-en/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'
Here is a link to a similar answer that provides a PHP script to check the headers: Detect X-Frame-Options
You can modify it so that it takes a GET variable as such:
Then use an ajax request to test each url