{"id":7366,"date":"2021-08-04T10:05:49","date_gmt":"2021-08-04T10:05:49","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7366"},"modified":"2021-08-04T10:05:51","modified_gmt":"2021-08-04T10:05:51","slug":"html-sandbox","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/","title":{"rendered":"HTML: Sandbox"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The restriction to the content such as disabling script or plugins is given by the internal frame.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">  An iframe with sandbox value as empty will have the following restrictions: &#8211;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Forms can not be submitted<\/li><li>Framed document cannot navigate its top level parent<\/li><li>Scripts are disabled                                            <\/li><li>Stops frame content from using plugins<\/li><li>New windows(browsing contexts) cannot be created by the framed document<\/li><li>Framed content will be treated from an unique origin. Hence it will not have access to data stored in earlier cookies<\/li><li>Disable APIs<\/li><li>Automatically triggered features like auto playing videos etc are blocked<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">&lt;iframe sandbox> &lt;\/iframe><\/h4>\n\n\n\n<h2 class=\"wp-block-heading\">                            <strong>Values<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Value<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>(no value)<\/td><td>Applies all restrictions<\/td><\/tr><tr><td>allow-forms<\/td><td>Re-enables form submission<\/td><\/tr><tr><td>allow-pointer-lock<\/td><td>Re-enables APIs<\/td><\/tr><tr><td>allow-popups<\/td><td>Re-enables popups<\/td><\/tr><tr><td>allow-same-origin<\/td><td>Allows the iframe content to be treated as being from the same origin<\/td><\/tr><tr><td>allow-scripts<\/td><td>Re-enables scripts<\/td><\/tr><tr><td>allow-top-navigation<\/td><td>Allows the iframe content to navigate its top-level browsing context<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>                     allow-same-origin<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A web page can have access to a second web page only if both have the same origin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Uniform Resource Identifier (URI), Port Number, and HostName<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Same-origin<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/www.google.com\/p\/contact-us.html<\/li><li>https:\/\/www.google.com\/p\/about-us.html<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Different Port So Not in the Same Origin<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/www.google.com:82\/p\/contact-us.html<\/li><li>https:\/\/www.google.com\/p\/about-us.html<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Different Host So Not in the Same Origin<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>https:\/\/en.www.google.com\/p\/contact-us.html<\/li><li>https:\/\/www.google.com\/p\/contact-us.html <\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">                <strong>allow-top-navigation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Top navigation allows us to open the linked document in the full body of the window or the top browsing context.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Attribute<\/strong><\/td><td><strong>Value<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>target<\/td><td>_blank _parent _top framename _self<\/td><td>Opens the linked document in a new window or tab Opens the linked document in the parent frame Opens the linked document in the full body of the window Opens the linked document in a named frame Opens the linked document in the same frame as it was clicked (this is the default)<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The restriction to the content such as disabling script or plugins is given by the internal frame. An iframe with [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":7373,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4864],"tags":[4459,5884,5469,5885],"class_list":["post-7366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-html","tag-html","tag-html-sandbox","tag-html-tag","tag-iframe-sandbox-in-html"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HTML: Sandbox - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HTML: Sandbox - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"The restriction to the content such as disabling script or plugins is given by the internal frame. An iframe with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-04T10:05:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-04T10:05:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/iframesandbox.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"vikashdev k\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vikashdev k\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/\"},\"author\":{\"name\":\"vikashdev k\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\"},\"headline\":\"HTML: Sandbox\",\"datePublished\":\"2021-08-04T10:05:49+00:00\",\"dateModified\":\"2021-08-04T10:05:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/\"},\"wordCount\":320,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/iframesandbox.png\",\"keywords\":[\"HTML\",\"html sandbox\",\"html tag\",\"iframe sandbox in html\"],\"articleSection\":[\"HTML\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/\",\"name\":\"HTML: Sandbox - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/iframesandbox.png\",\"datePublished\":\"2021-08-04T10:05:49+00:00\",\"dateModified\":\"2021-08-04T10:05:51+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/iframesandbox.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/iframesandbox.png\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/html-sandbox\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HTML: Sandbox\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\",\"name\":\"vikashdev k\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"caption\":\"vikashdev k\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/vikashdev\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HTML: Sandbox - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/","og_locale":"en_US","og_type":"article","og_title":"HTML: Sandbox - scmGalaxy","og_description":"The restriction to the content such as disabling script or plugins is given by the internal frame. An iframe with [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-04T10:05:49+00:00","article_modified_time":"2021-08-04T10:05:51+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/iframesandbox.png","type":"image\/png"}],"author":"vikashdev k","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vikashdev k","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/"},"author":{"name":"vikashdev k","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515"},"headline":"HTML: Sandbox","datePublished":"2021-08-04T10:05:49+00:00","dateModified":"2021-08-04T10:05:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/"},"wordCount":320,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/iframesandbox.png","keywords":["HTML","html sandbox","html tag","iframe sandbox in html"],"articleSection":["HTML"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/","name":"HTML: Sandbox - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/iframesandbox.png","datePublished":"2021-08-04T10:05:49+00:00","dateModified":"2021-08-04T10:05:51+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/iframesandbox.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/iframesandbox.png","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/html-sandbox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"HTML: Sandbox"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515","name":"vikashdev k","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","caption":"vikashdev k"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/vikashdev\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7366"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7366\/revisions"}],"predecessor-version":[{"id":7374,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7366\/revisions\/7374"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/7373"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}