[SalesForce] Iframe won’t load on Salesforce1

All I'm trying to do is load an iframe on a click on the main image and then a click on the header of the iframe reloads the main image. However, this isn't working on Salesforce 1 becuause:

[blocked] The page at 'https://na16.salesforce.com/one/one.app' was loaded over HTTPS, but ran insecure content from 'http://www.u2.com': this content should also be loaded over HTTPS.

A HTTPS version of the U2 site doesn't exist how do I solve this? Here is the code:

  <apex:page showHeader="False">
 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"><script>          

<apex:image value="{!$Resource.image1}" styleClass="image slide1"/>
<div id="news"></div>
<apex:iframe src="http://www.u2.com" scrolling="true" id="theIframe"/>

<div id="header" style="position:absolute !important;"></div> 
 <script>
  $(document).ready(function(){

  $('#theIframe').hide();
  $('.slide3').hide();

  $(".slide1").click(function(){
      $(".slide1").hide();
      $("#theIframe").show();
          $("#header").click(function(){
          $("#theIframe").hide();
          $(".slide1").show();
         });
  });


 });   

 </script>

 <style>    
 .image {
     width: 100%;


 }
 #header{
     width: 100%;
     height: 200px;
     bottom: 91%;
     z-index: 1000;

 }
</style>
</apex:page>

Best Answer

This is nothing to do with Salesforce .It is your chrome browser or mozilla blocking this .Modern day browsers have gone smart .

Check the below knowledge article link from Salesforce on this issue

https://help.salesforce.com/apex/HTViewSolution?id=000213361&language=en_US

Having said that browsers also provide mechanism to load unsafe script at your own risk ,

Here is your Visualforce page i opened in chrome

enter image description here

First time it blocked but then you will see on top of browser to load unsafe script

enter image description here

Using same in one/one.app I loaded your page on Salesforce 1 app also

enter image description here

Mozilla also blocks your content if it comes from unsecure site ,it also provides a small icon to unblock it .Please take a look at extreme right corner of your browser to load unsafe script

enter image description here

All this are short term band aids while permanent solution is to get surgery with HTTPS implemented for your website .

Related Topic