title: SharePoint 2013 app re-size issue
body: <p>I'm developing a SharePoint hosted app &amp; there is requirement to calculate dynamic height based on content &amp; screen resolution, keeping width to 100%. I've used below code &amp; I've 2 scenarios.</p>
  
  <ol>
  <li>host-web &amp; app-web both on HTTP - It works well</li>
  <li>host-web on HTTP, while app-web on HTTPS - Web-part doesn't resize. </li>
  </ol>
  
  <p>I'm unable to identify the issue since I don't see any error in developer dashboard too. Can anyone help me with this?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt; script type = "text/javascript" &gt;
    window.Communica = window.Communica || {};
  
  $(document).ready(function() {
    Communica.Part.init();
  });
  
  Communica.Part = {
    senderId: '',
  
    init: function() {
      var params = document.URL.split("?")[1].split("&amp;");
      for (var i = 0; i &lt; params.length; i = i + 1) {
        var param = params[i].split("=");
        if (param[0].toLowerCase() == "senderid")
          this.senderId = decodeURIComponent(param[1]);
      }
  
  
      this.adjustSize();
    },
  
    adjustSize: function() {
      var resizeMessage = '&lt;message senderId={Sender_ID}&gt;resize({Width}, {Height})&lt;/message&gt;';
  
      resizeMessage = resizeMessage.replace("{Sender_ID}", this.senderId);
      //Dynamic height to be calculated, at the moment fixed height is also not working
      resizeMessage = resizeMessage.replace("{Height}", "500px");
      resizeMessage = resizeMessage.replace("{Width}", "100%");
  
      window.parent.postMessage(resizeMessage, "*");
    }
  }; &lt; /script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="userDataContent"&gt;
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
    in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>