Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE warning workaround? Page w/Secure and insecure items

I have a page that is viewed secured with 'https' in the URL, that also contains youtube urls to play video from youtube. Since the youtube URL contains 'http' with no 's' IE is giving an a warning dialog of "This page contains both secure and non-secure Items."

Is there a way I can workaround this in Javascript? Maybe after the page loads generate the youtube player HTML with a function? The url will still have to begin with 'http://'

EDIT: Thanks everyone for the input so far! I know this sounds impossible. I'd be happy if there was some conditional comment or something so I can tell IE to suppress this dialog box. It confuses our customer since most of the world is in IE, FF has much better behavior in that it tells you if you click the broken lock, but not an annoying popoup. This is like a new version of "your program has performed an illegal operation." (user hides from police) I am embedding youtube video onto the page where the src is from youtube. I am using their player, as it is hosted by them. No way out of this that I see.

I guess my fix is to only apply HTTPS to the very sensitive pages (password change, login) and come out of it in all others so youtube videos don't give this popup. I am in PHP and am worried the SESSION will get clobbered if I do this but I guess it is the only way around and will wait to tackle that bear monday.

like image 937
tkotitan Avatar asked Feb 06 '09 19:02

tkotitan


People also ask

How do I get rid of trusted site Security warning?

On your computer, open Chrome. Settings. Security. Under "Safe Browsing," choose No protection (not recommended).

How do I stop Internet Explorer from blocking websites?

Open Internet Explorer, select the Tools button , and then select Internet options. Select the Security tab, choose one of the security zone icons (Local intranet, Trusted sites, or Restricted sites), and then select Sites. You can add sites to the zone you chose, or delete sites that you no longer want in this zone.

How do you bypass a non secure website?

Go to the experiments page of your Chrome browser by typing chrome://flags in the address bar. On the top search bar for 'search flags', type to search the not secure settings. From the setting available, click on the drop-down menu on your right to select 'disabled' to turn off the not secure warnings.

How do I get rid of only secure content is displayed in IE 11?

To Disable/Enable/Prompt the Only secure content is displayed message: From the start screen, type Internet Options. Tap or select the Settings option below the Search box, and then tap or select Internet Options. Tap or select the Security tab, and then tap or select the Custom Level.


2 Answers

One thing I've done to work around this problem is to create a page on my SSL site that proxies in the 3rd party resource. That way the client only sees SSL URLs.

For example, you flash player could point to the URL "https://YourSite.com/proxy.aspx?URL=http://www.youtube.com/video.swf". When "proxy.aspx" is called, it would make a new web request to the URL in the query string and return the data to the client.

If you do this you need to validate the proxied URL or use some kind ID so that the URL can not be changed since you are convincing the browser that this content is trusted.

like image 163
David Avatar answered Oct 09 '22 16:10

David


I've worked around this problem on all browsers using the following:

1) Create a thumbnail image of the start of the video with the "Play image" tag on the snapshot and host the image on your own https server. Embed the thumbnail where you want the video to be.

2) When the user clicks on the image invoke a Javascript onclick handler to create a new window with the href of the http embedded youtube video.

function onImgClickHandler() {
  //Link to embedded Viddler or Youtube video
  var win = window.open("http://www.viddler.com/player/###/", "My Video",
    'height=500,width=800,resizable=yes,scrollbars=yes');
  win.focus();
}

3) The video will now appear in a popup of the main page.

I usually use videos as tutorials for my site, so having the video in a popup browser window works well because it can be viewed alongside the main content and lets the user follow along with the site. The browsers do not even give a redirect warning that you are invoking an http popup from an https site, so your users will not see any "scary" non-secure item warnings on any browsers.

Hope this helps, I have an example of the above on the landing page of my site: https://drchrono.com/

UPDATE: I made the image preview by taking a screenshot of the playing video.

like image 28
MikeN Avatar answered Oct 09 '22 15:10

MikeN