{"id":23199,"date":"2020-12-09T10:03:16","date_gmt":"2020-12-09T02:03:16","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&#038;p=23199"},"modified":"2022-09-08T20:00:19","modified_gmt":"2022-09-08T12:00:19","slug":"secure-web-page-that-contains-insecure-elements","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/secure-web-page-that-contains-insecure-elements","title":{"rendered":"Secure web page that contains insecure elements"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"23199\" class=\"elementor elementor-23199\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-42a833b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"42a833b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0b6f43d\" data-id=\"0b6f43d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-81e4eff elementor-widget elementor-widget-heading\" data-id=\"81e4eff\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Secure web page that contains insecure elements<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-85d311e elementor-widget elementor-widget-image\" data-id=\"85d311e\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/casbay.com\/guide\/wp-content\/uploads\/2021\/02\/300px-Page_secure_and_nonsecure_items_security_dialog.png\" title=\"\" alt=\"\" loading=\"lazy\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3295d87 elementor-widget elementor-widget-text-editor\" data-id=\"3295d87\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>A secure web page that contains insecure elements<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5f9213e elementor-widget elementor-widget-text-editor\" data-id=\"5f9213e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>When visitors to your web site request a page using a secure <em>https:\/\/<\/em>\u00a0connection, a broken padlock icon may appear in the web browser\u2019s location bar. Additionally, they may receive a warning message:<\/p><ul><li><strong>Mozilla Firefox<\/strong>\u00a0displays:<br \/>\u201cThe connection to this website is not fully secure because it contains unencrypted elements (such as images).\u201d<\/li><li><strong>Microsoft Internet Explorer<\/strong>\u00a0displays:<br \/>\u201cDo you want to view only the webpage content that was delivered securely?<br \/>This webpage contains content that will not be delivered using a secure HTTPS connection, which could compromise the security of the entire webpage.\u201d<\/li><li><strong>Google Chrome<\/strong>\u00a0displays:<br \/>\u201cYour connection to\u00a0<em>example.com<\/em> is encrypted with 256-bit encryption. However, this page includes other resources that are not secure. Others can view these resources while in transit. Attackers can modify them to change the look of the page.\u201d<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e133b36 elementor-widget elementor-widget-text-editor\" data-id=\"e133b36\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>This problem occurs if a web page contains hyperlinks to insecure elements. For example, consider a web page that contains the following HTML snippet:<\/p><pre><a>http:\/\/www.example.com\/images\/picture.jpg<\/a><\/pre><p>In this HTML snippet, the hyperlink references a non-secure\u00a0<em>http:\/\/<\/em>\u00a0resource (a .jpg file). If a user requests this page using an\u00a0<em>https:\/\/<\/em>\u00a0connection, the page itself is encrypted, but the hyperlinked image file is not. As a result, the page contains secure and insecure content, and the browser displays a warning message to the user.<\/p><p>This problem can occur with any type of resource file that we hyperlink \u2013 a JavaScript library, a CSS file, and so on.<\/p><p>To resolve this problem, please use the method below (that we suggest).<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-71ee61a elementor-widget elementor-widget-heading\" data-id=\"71ee61a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Use relative links<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21beda3 elementor-widget elementor-widget-text-editor\" data-id=\"21beda3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>You can use relative links in hyperlink URLs to prevent browsers from displaying warning messages about insecure content. For example, we could rewrite the above HTML snippet as follows:<\/p><pre>\/images\/picture.jpg<\/pre><p>Instead of the explicitly insecure <em>http:\/\/<\/em> URL as above, the reference link references the image file. This makes the browser unavailable to warn users about mixed secure and insecure content.<\/p><p>You may have HTML code that references a resource on another domain (such as a JavaScript library or CSS file). In this scenario, you clearly cannot use a relative link to the external resource. Instead, you can modify the hyperlink in your HTML code to use\u00a0<em>https:\/\/<\/em>\u00a0in the URL instead of\u00a0<em>http:\/\/<\/em>.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Secure web page that contains insecure elements A secure web page that contains insecure elements When visitors to your web site request a page using a secure https:\/\/\u00a0connection, a broken padlock icon may appear in the web browser\u2019s location bar. Additionally, they may receive a warning message: Mozilla Firefox\u00a0displays: \u201cThe connection to this website is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[113],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/23199"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=23199"}],"version-history":[{"count":4,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/23199\/revisions"}],"predecessor-version":[{"id":35413,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/23199\/revisions\/35413"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=23199"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=23199"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=23199"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=23199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}