1<html> 2 <head> 3 <meta charset="utf-8" /> 4 <title>Iframe Tester</title> 5 <meta name="description" content="Test any webpage being rendered in an iframe"> 6 <meta property="og:title" content="Render page in iframe online"/> 7 <meta property="og:description" content="Tool to load up any webpage in an iframe to test for display, CORS settings, and third-party cookies"/> 8 <meta property="og:image" content="https://iframetester.com/img/icon.png" /> 9 <meta property="og:url" content="https://iframetester.com" /> 10 <meta property="og:image:type" content="image/jpeg" /> 11 <meta property="og:image:width" content="598" /> 12 <meta property="og:image:height" content="534" /> 13 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 14 <link rel="shortcut icon" type="image/ico" href="./img/icon.ico" /> 15 16 17 <link rel="stylesheet" href="./css/vendored/normalize.css"> 18 <link rel="stylesheet" href="./css/vendored/flexbox.css"> 19 <link rel="stylesheet" href="./css/vendored/font-awesome.min.css"> 20 <link rel="stylesheet" href="./css/index.css"> 21 22
22<script type='text/javascript' src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
22 23 <!--
23<script type='text/javascript' src="./js/vendored/jquery-plugins.js"></script>
23 --> 24
24<script type='text/javascript' src="./js/index.js"></script>
24 25 26 <link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet"> 27 28 <!-- Global site tag (gtag.js) - Google Analytics -->
vendor: 72 bytes, lines 28-29
28 29 <script async src="https://www.googletagmanager.com/gtag/js?id=
29UA-158633083-1
vendor: 20 bytes, lines 29-30
29"></script> 30
30<script> 31
vendor: 158 bytes, lines 31-35
31window.dataLayer = window.dataLayer || []; 32 function gtag(){dataLayer.push(arguments);} 33 gtag('js', new Date()); 34 35 gtag('config', '
35UA-158633083-1
vendor: 12 bytes, lines 35-36
35'); 36
36</script>
36 37 38 <!-- GA4 Google tag (gtag.js) -->
vendor: 72 bytes, lines 38-39
38 39 <script async src="https://www.googletagmanager.com/gtag/js?id=
39G-HBCD5GH54G
vendor: 20 bytes, lines 39-40
39"></script> 40
40<script> 41
vendor: 158 bytes, lines 41-45
41window.dataLayer = window.dataLayer || []; 42 function gtag(){dataLayer.push(arguments);} 43 gtag('js', new Date()); 44 45 gtag('config', '
45G-HBCD5GH54G
vendor: 12 bytes, lines 45-46
45'); 46
46</script>
46 47 48 <!-- Adsense --> 49
49<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9965878625363779" 50 crossorigin="anonymous"></script>
50 51 52 </head> 53 <body> 54 <header> 55 <h1>Iframe Tester</h1> 56 </header> 57 <main> 58 <div class="search-bar-container"> 59 <input id="url-search" type="url" placeholder="Enter a url"></input> 60 <button onclick="submit()">Render iframe</button> 61 </div> 62 <div class="wrapper"> 63 <div class="window"></div> 64 <div class="middle"> 65 66 <!-- <a class="affiliate" target="_blank" href="https://thehiveindex.com/topics/software-development/?utm_source=iframetester" 67 onclick="trackEvent('AffiliateClick', {'name': 'The Hive Index', 'location': 'top'})" 68 > 69 The Hive Index - Find the Best Online Communities for Programmers â 70 </a> --> 71 72 <div class="iframe-container"> 73 <iframe id="iframe-window"> 74 <p>Your browser does not support iframes.</p> 75 </iframe> 76 <div id="blank-state"> 77 <h2>Test a url to see if it can be displayed in an iframe</h2> 78 <p>Not all web pages can be embedded in an iframe.</p> 79 <p>This setting is determined by the "X-Frame-Options" sent from the page's server.</p> 80 </div> 81 <div id="loading-state"> 82 <h2>Loading...</h2> 83 </div> 84 <div id="error-message"> 85 <h2 id="error-text"></h2> 86 </div> 87 </div> 88 <div> 89 <h2>About this site</h2> 90 <p>iframetester.com is the easiest way to test if a particular webpage can be embedded in an iframe. It is primarily a tool for developers to test their web page to ensure their application behaves as expected on a third-party site.</p> 91 92 <h2>What is an iframe?</h2> 93 <p>An iframe is an HTML element which can embed another webpage on a parent page. It is commonly used to display third-party content like videos, advertisements, and small web apps designed to be used on multiple websites. The URL to be embedded is supplied by the "src=" parameter on the iframe element. Besides the width/height of the iframe, a webpage embedding a url in an iframe has no control over the embedded site's content, it just supplies the URL to be embedded.</p> 94 95 <h2>What determines if a webpage can be embedded in an iframe?</h2> 96 <p>Not all web pages can be rendered in an iframe. This is determined by certain headers that are sent in a web request for a particular website. This header is called "X-Frame-Options" and the options are DENY, SAMEORIGIN ,and ALLOW-FROM=url. This allows a website owner to determine which websites (if any) can embed their content, and browsers abide by these headers. To learn more about this header, see <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options" target="_blank">this article</a>.</p> 97 98 <h2>How to iframe a webpage</h2> 99 <div> 100 <div>Here is an example of an HTML document with an iframe in it. Please note that the example url cannot be iframed due to the header mentioned above.</div> 101<pre> 102<code> 103 <!DOCTYPE html> 104 <html> 105 <head></head> 106 <body> 107 <iframe src="https://google.com" width="100%" height="400" /> 108 </body> 109 </html> 110 111</code> 112</pre> 113 </div> 114 115 <h2>How can I test if a webpage can be iframed?</h2> 116 <p>Enter a url in the search bar above and press "Render Iframe". If you see the webpage load, the page is allowed to be iframed. If you see an error message like "refused to connect", that means that the webpage is not allowed to be iframed on this site. Open the developer console to see the specific error.</p> 117 118 <h2>What differentiates an iframed webpage from a regular one?</h2> 119 <p>
119Besides the "X-Frame-Options" header that determines if a webpage can be iframed, there are other things to consider. For privacy and security reasons, webpages embedded in an iframe might be restricted in their ability to set/read browser cookies. This is important to consider if your embedded web app uses cookies for user authentication.</p> 120 121 122 <h2>Content Ownership Notice</h2> 123 <p> 124 iframetester.com does not host, copy, or store any third-party content. 125 All content displayed in iframes is loaded directly from the original source URL by the user for debugging/testing purposes only. 126 All copyrights remain with their respective owners. 127 If you are the owner of a website and don't want it embedded in an iframe, you can set the X-Frame-Options header to DENY. 128 </p> 129 130 <!-- <a class="affiliate" target="_blank" href="https://thehiveindex.com/topics/software-development/?utm_source=iframetester" 131 onclick="trackEvent('AffiliateClick', {'name': 'The Hive Index', 'location': 'bottom'})" 132 > 133 The Hive Index - Find the Best Online Communities for Programmers â 134 </a> --> 135 </div> 136 </div> 137 <div class="window"></div> 138 </div> 139 </main> 140 <footer> 141 142 </footer> 143 144 <!-- tinyadz --> 145
145<script src="https://cdn.apitiny.net/scripts/v2.0/main.js" data-site-id="6a9b089798de960595b3a17e" data-test-mode="false" async></script>
145 146 </body> 147</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.