Responsivator icon indicating copy to clipboard operation
Responsivator copied to clipboard

Detection of websites using X-Frame-Options

Open martey opened this issue 13 years ago • 5 comments

When I tried this on my personal website, I freaked out for a couple of seconds because nothing was displayed. I eventually realized that this was because I was using X-Frame-Options to prevent clickjacking.

I found a StackOverflow answer showing a method to detect X-Frame-Options client-side. Would you consider integrating it?

martey avatar Oct 15 '12 12:10 martey

You can detect, but it still won't display in the iFrame, so I'm not sure what the point would be?

johnpolacek avatar Oct 15 '12 15:10 johnpolacek

Neither Chrome nor Firefox display an error message in the iframe when X-Frame-Options is causing an iframed site not to load, so it is not clear (without loading an error console or looking at HTTP headers) that Responsivator is not at fault.

I thought it might make the site more user-friendly if it displayed an error message to let the user know that this might be the issue. One could argue that this is the browser's responsibility, though.

martey avatar Oct 15 '12 16:10 martey

I accept pull requests! :)

johnpolacek avatar Oct 10 '14 13:10 johnpolacek

@johnpolacek did anyone ever do anything about this? I'm going to look for a solution to warn people using the am i responsive tool so if you're interested I'll share the solutions

justincavery avatar Jan 07 '15 10:01 justincavery

Sounds good, thanks!

johnpolacek avatar Jan 07 '15 15:01 johnpolacek