lookup> X-Frame-Options

X-Frame-Options

indicates a policy that specifies whether the browser should render the transmitted resource within a <frame> or an <iframe>. Servers can declare this policy in the header of their HTTP responses to prevent clickjacking attacks, which ensures that their content is not embedded into other pages or frames.

响应头RFC7034
NameX-Frame-Options
Type响应头
SpecificationRFC7034

indicates a policy that specifies whether the browser should render the transmitted resource within a <frame> or an <iframe>. Servers can declare this policy in the header of their HTTP responses to prevent clickjacking attacks, which ensures that their content is not embedded into other pages or frames.

X-Frame-Options: DENY

RFC7034

What does the X-Frame-Options header do?

indicates a policy that specifies whether the browser should render the transmitted resource within a <frame> or an <iframe>. Servers can declare this policy in the header of their HTTP responses to prevent clickjacking attacks, which ensures that their content is not embedded into other pages or frames.

Is X-Frame-Options a request or response header?

It is classified as a response header and can appear in requests or responses depending on context.