Bug 90660 - Add a way to detect x-frame-options when loading a url
Summary: Add a way to detect x-frame-options when loading a url
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-05 23:17 PDT by Jon
Modified: 2023-03-01 08:55 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2012-07-05 23:17:20 PDT
It would be great if there was a way to detect when frame content can't be loaded because of the x-frame-options header.  That way, if we were showing framed content we could alert the user why it won't load, or just forward them to the url in the frame.  

Maybe there could be an onError handler when loading the frame?

There's an outstanding stackoverflow question about this:
http://stackoverflow.com/questions/7950184/is-there-a-client-side-way-to-detect-x-frame-options
Comment 1 lb1.3 2016-06-15 10:41:52 PDT
How is this "unconfirmed"? Many people are asking for the event to detect this and it seems odd that it's not a standardized error or an error code you can detect in JS.
Comment 2 Anne van Kesteren 2023-03-01 08:55:54 PST
This is not something we want to expose directly to JavaScript as it could be used to attack cross-origin resources. (It would also go against the HTML Standard.)