<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wikihandbk.com/ruwiki/index.php?action=history&amp;feed=atom&amp;title=%D0%90%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B0%D1%8F_%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F%3AFramekiller</id>
	<title>Английская Википедия:Framekiller - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wikihandbk.com/ruwiki/index.php?action=history&amp;feed=atom&amp;title=%D0%90%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B0%D1%8F_%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F%3AFramekiller"/>
	<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=%D0%90%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B0%D1%8F_%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:Framekiller&amp;action=history"/>
	<updated>2026-05-01T21:04:08Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://wikihandbk.com/ruwiki/index.php?title=%D0%90%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B0%D1%8F_%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:Framekiller&amp;diff=14756114&amp;oldid=prev</id>
		<title>EducationBot: Новая страница: «{{Английская Википедия/Панель перехода}} {{Short description|Technique used by websites to prevent loading in frames}} A '''framekiller''' (or '''framebuster''' or '''framebreaker''') is a technique used by websites and web applications to prevent their web pages from being displayed within a frame. A frame is a subdivision of a Web browser window and can act like a smaller window. A framek...»</title>
		<link rel="alternate" type="text/html" href="http://wikihandbk.com/ruwiki/index.php?title=%D0%90%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B0%D1%8F_%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:Framekiller&amp;diff=14756114&amp;oldid=prev"/>
		<updated>2024-03-09T02:21:37Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «{{Английская Википедия/Панель перехода}} {{Short description|Technique used by websites to prevent loading in frames}} A &amp;#039;&amp;#039;&amp;#039;framekiller&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;framebuster&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;framebreaker&amp;#039;&amp;#039;&amp;#039;) is a technique used by &lt;a href=&quot;/ruwiki/index.php?title=Websites&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Websites (страница не существует)&quot;&gt;websites&lt;/a&gt; and &lt;a href=&quot;/ruwiki/index.php?title=Web_application&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Web application (страница не существует)&quot;&gt;web applications&lt;/a&gt; to prevent their &lt;a href=&quot;/ruwiki/index.php?title=Web_page&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Web page (страница не существует)&quot;&gt;web pages&lt;/a&gt; from being displayed within a &lt;a href=&quot;/ruwiki/index.php?title=HTML_element&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;HTML element (страница не существует)&quot;&gt;frame&lt;/a&gt;. A frame is a subdivision of a Web browser window and can act like a smaller window. A framek...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Английская Википедия/Панель перехода}}&lt;br /&gt;
{{Short description|Technique used by websites to prevent loading in frames}}&lt;br /&gt;
A '''framekiller''' (or '''framebuster''' or '''framebreaker''') is a technique used by [[websites]] and [[web application]]s to prevent their [[web page]]s from being displayed within a [[HTML element#Frames|frame]]. A frame is a subdivision of a Web browser window and can act like a smaller window. A framekiller is usually used to prevent a website from being loaded from within a frameset without permission or as an attack, as with [[clickjacking]].&lt;br /&gt;
&lt;br /&gt;
Framekiller scripts have largely been replaced by the usage of [[Clickjacking#X-Frame-Options|&amp;lt;code&amp;gt;X-Frame-Options&amp;lt;/code&amp;gt;]] and [[Clickjacking#Content_Security_Policy|&amp;lt;code&amp;gt;Content-Security-Policy&amp;lt;/code&amp;gt;]] [[List_of_HTTP_header_fields|headers]], which prevent the page from being loaded in a frame in the first place. These headers are supported by all modern browsers and do not require the use of [[JavaScript]].&amp;lt;ref&amp;gt;{{cite web |url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors |title=CSP: frame-ancestors |access-date=2023-09-27}}&amp;lt;/ref&amp;gt; These headers are also intended to be specified inside the [[web server]] software, rather than directly inside the HTML.&lt;br /&gt;
&lt;br /&gt;
==Implementations==&lt;br /&gt;
Framekillers are implemented using [[JavaScript]] that validates if the current window is the main window. The recommended approach is to block rendering of the window by default and only unblock it after confirming the current window is the main one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;style&amp;gt;html{display:none;}&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
   if (self == top) {&lt;br /&gt;
       document.documentElement.style.display = 'block'; &lt;br /&gt;
   } else {&lt;br /&gt;
       top.location = self.location; &lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This approach was proposed in 2010 by Gustav Rydstedt, [[Elie Bursztein]], [[Dan Boneh]] and Collin Jackson in a paper that highlighted the limitations of existing frame-busting techniques along with techniques allowing to bypass them.&amp;lt;ref name=&amp;quot;bustingframe&amp;quot;&amp;gt;{{cite conference&lt;br /&gt;
|author1=G. Rydstedt |author2=E. Bursztein |author3=D. Boneh |author4=C. Jackson |title=Busting Frame Busting: a Study of Clickjacking Vulnerabilities on Popular sites&lt;br /&gt;
|book-title = 3rd Web 2.0 Security and Privacy workshop&lt;br /&gt;
|year=2010&lt;br /&gt;
|publisher=IEEE&lt;br /&gt;
|url=https://elie.net/publication/busting-frame-busting-a-study-of-clickjacking-vulnerabilities-on-popular-sites/&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alternative solutions ===&lt;br /&gt;
An alternative choice is to allow the user to determine whether to let the framekiller work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var framekiller = false;&lt;br /&gt;
window.onbeforeunload = function() { &lt;br /&gt;
  if (framekiller) {&lt;br /&gt;
    return &amp;quot;...&amp;quot;;  // any message that helps user to make decision&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the code below should be added after the frame tag:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//&amp;quot;my_frame&amp;quot; should be changed according to the real id of the frame in your page &lt;br /&gt;
document.getElementById(&amp;quot;my_frame&amp;quot;).onload = function() { &lt;br /&gt;
  framekiller = true;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Original framekillers===&lt;br /&gt;
&lt;br /&gt;
Historically, the first framekiller scripts were as simple as this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  if (top != self) top.location.replace(location);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The logic here was to display the page, but check if the top location is the same as the current page, and replace the top by current if not. This method however can be easily bypassed by blocking execution of the framebuster script from the outer frame.&amp;lt;ref name=&amp;quot;bustingframe&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Framekiller limitations==&lt;br /&gt;
&lt;br /&gt;
[[Client-side JavaScript]] solution relies on the end-user's browser enforcing their own security. This makes it a beneficial, but unreliable, means of disallowing your page to be embedded in other pages. The following situations may render the script above useless:&lt;br /&gt;
&lt;br /&gt;
* The user agent does not support JavaScript.&lt;br /&gt;
* The user agent supports JavaScript but the user has turned support off.&lt;br /&gt;
* The user agent's JavaScript support is flawed or partially implemented.&lt;br /&gt;
&lt;br /&gt;
==Anti-framekiller==&lt;br /&gt;
The [[HTML element#Frames|iframe]] in HTML5 has a {{mono|sandbox}} attribute.&amp;lt;ref&amp;gt;{{Cite web |url=http://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox |title=Archived copy |access-date=2014-11-01 |archive-url=https://web.archive.org/web/20130606104953/http://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox |archive-date=2013-06-06 |url-status=dead }}&amp;lt;/ref&amp;gt; The attribute's value is a set of allowed capabilities for the iframe's content. If the value is empty or not set, the iframe's content will not execute JavaScript, and won't allow top-level navigation. By specifying {{mono|allow-scripts}} in the space separated set of exceptions in the value, the iframe will allow JavaScript, but will still disallow top-level navigation, rendering framekillers in the iframe impotent.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Clickjacking]] - discusses more sophisticated methods to prevent embedding in a frame, such as X-Frame-Options header&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:HTML]]&lt;br /&gt;
{{Навигационная таблица/Портал/Английская Википедия}}&lt;br /&gt;
[[Категория:Английская Википедия]]&lt;br /&gt;
[[Категория:Википедия]]&lt;br /&gt;
[[Категория:Статья из Википедии]]&lt;br /&gt;
[[Категория:Статья из Английской Википедии]]&lt;/div&gt;</summary>
		<author><name>EducationBot</name></author>
	</entry>
</feed>