Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

How to detect x-frame-options when loading a website in iframe

  • 2 отговора
  • 1 има този проблем
  • 16 изгледи
  • Последен отговор от Naresh Gunda

more options

Loading external website in an iframe is getting blocked because of x-frame-options in response headers. I want to detect what is the value for x-frame-options and based on that value i want to show an alert to the user. How can we detect/extract x-frame-options from the response headers for the given url even if it has redirects?

Loading external website in an iframe is getting blocked because of '''x-frame-options''' in response headers. I want to detect what is the value for '''x-frame-options''' and based on that value i want to show an alert to the user. '''How can we detect/extract x-frame-options from the response headers''' for the given url even if it has redirects?

Променено на от Naresh Gunda

Всички отговори (2)

more options

I'm not sure under what conditions you want to check this like you have a website that allows to embed such content or you want to do this locally.

There is an extension for Firefox that allows this.

more options

I want to do it programmatically as i don't want end user to go to settings and disable enhanced tracking protection or installing some extensions in order to work with embeded content. So if i'm able to detect the x-frame-options i can ask user to launch the same url in new window by providing a button(Latest Firefox is doing similarly but i want to handle it in our website so that solution will work across the browsers).

Attached firefox implementation screenshot for reference.

Променено на от Naresh Gunda