Can you please explain this internet explorer message ?

Posted on 2010-01-08
Last Modified: 2013-12-08
Hello i have my website that auto redirect to secure https, only in internet explorer i am getting this message
do you want to view only the webpage content that was delivered securely ?

The webpage contains content that will not be delivered using a secure HTTPS connection which could compromise the security of the entire webpage

So if i press yes it give the page with no css loaded and the form don't work ! if i press yes it load correctly so how can i fix to prevent getting this problem as many customers is confusing them and don't what to press !

You can try it , but first you need to set your country than retry it to check the page
an example

Question by:Styleminds
    LVL 82

    Expert Comment

    That is happening because on the browser you are typing

    but the html code is retrieving some files in a NON-secure manner. If you look at the source code you will see:
    <link rel="stylesheet" href="" type="text/css" />
    <link rel="stylesheet" href="" type="text/css" />
    <link rel="stylesheet" href="" type="text/css" />
    <link rel="stylesheet" href="" type="text/css" />
    Notice that all of them have href="http://...
    instead of href="https://...
    instead, you need to code them WITHOUT your domain:
    <link rel="stylesheet" href="/newincludes/css/basic.css" type="text/css" />
    <link rel="stylesheet" href="/newincludes/css/dropdown.css" type="text/css" />
    <link rel="stylesheet" href="/newincludes/css/rating.css" type="text/css" />
    <link rel="stylesheet" href="/newincludes/css/popup.css" type="text/css" />
    this way they will "inherit" the protocol (http or https) used on the address bar.

    Open in new window


    Author Comment

    i put full path as there some links it forced redirected for better url in .htaccess so if there any trick ?
    LVL 82

    Expert Comment

    >>there some links it forced redirected
    I don't know what you mean by that, in mod_rewrite you typically use regular expressions. If one of your regular expressions is looking explicitly for

    all you will need to do is use:

    basically you are saying that the "s" is now optional.

    No tricks! You need a relative path to avoid that warning.

    Author Comment

    but hielo this is a part of the header and it common for http and non https section.
    so if there any php trick to do.
    LVL 82

    Accepted Solution

    You are still confused. You are typing this on the address bar:

    Then file.php contains the following:
    <link rel="stylesheet" href="/newincludes/css/basic.css" type="text/css" />

    the BROWSER now sees a "conflict of interest" because the original request was for "https", but now that "link" will trigger another request - a request for basic.css - but this  time using "http". This "switching" between https and http is what the warning is all about. This is not a server issue, this is an BROWSER issue, so no there are not php "tricks".

    What you need is to give the browser what it expects - either all the links coded as http OR all the links coded as https.

    The easy way is to provide relative paths like I suggested above. An alternative would be "SNIFF" the protocol:
    $protocol=isset($_SERVER['HTTPS']) ? 'https' : "http";


    then change this:
    <link rel="stylesheet" href="/newincludes/css/basic.css" type="text/css" />

    to this:
    <link rel="stylesheet" href="<?=$prototcol?>://" type="text/css" />

    but you will need to manually change every link. Again, the easier alternative is to adjust the links to be relative so that the browser uses whatever protocol the user types.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
    How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now