<p>My application is using <strong>Dojo 1.1.1</strong> on an <em>SSL-only</em> website. It is currently taking advantage of <code>dijit.ProgressBar</code> and a <code>dijit.form.DateTextBox</code>.</p>

<p>Everything works fabulous in <em>Firefox 2 &amp; 3</em>, but as soon as I try the same scripts in <em>IE7</em> the results are an annoying Security Information dialog:</p>

<blockquote>
  <p>This page contains both secure and non-secure items. Do you want to display the non-secure items?</p>
</blockquote>

<p>I have scrutinized the page for any <em>non-HTTPS</em> reference to no avail. It appears to be something specific to <code>dojo.js</code>. There use to be an <code>iframe</code> glitch where the <code>src</code> was set to nothing, but this appears to be fixed now (on review of the source).</p>

<p>Anyone else having this problem? What are the best-practices for getting <em>Dojo</em> to play well with <em>IE</em> on an <em>SSL-only</em> web server?</p>

[{'answer_id': 60433, 'author': 'Till', 'author_id': 2859, 'author_profile': 'https://Stackoverflow.com/users/2859', 'pm_score': 1, 'selected': False, 'text': '<p>If your page is loading files from a non-https URL Firefox should tell you the same thing. Instead of an error the lock symbol at the bottom (in the status bar) should be crossed out. Are you sure that is not the case?</p>\n\n<p>If you see the symbol, click on it and check which files are "unsecure".</p>\n'}, {'answer_id': 72805, 'author': 'esarjeant', 'author_id': 644, 'author_profile': 'https://Stackoverflow.com/users/644', 'pm_score': 3, 'selected': False, 'text': '<p>After reviewing the JavaScript sourcecode for Dijit, I thought it was likely the error results from an "insecure" refrence to a dynamically generated IFRAME. Note there are two versions of the script file, the uncompressed represents the original source (dijit.js.uncompressed.js) and the standard (dijit.js) has been compressed for optimal transfer time. </p>\n\n<p>Since the uncompressed version is the most readable, I will describe my solution based on that. At line #1023, an IFRAME is rendered in JavaScript:</p>\n\n<pre><code>if(dojo.isIE){\n    var html="&lt;iframe src=\'javascript:\\"\\"\'"\n           + " style=\'position: absolute; left: 0px; top: 0px;"\n           + "z-index: -1; filter:Alpha(Opacity=\\"0\\");\'&gt;";\n    iframe = dojo.doc.createElement(html);\n}else{...\n</code></pre>\n\n<p>What\'s the problem? IE doesn\'t know if the src for the IFRAME is "secure" - so I replaced it with the following:</p>\n\n<pre><code>if(dojo.isIE){\n    var html="&lt;iframe src=\'javascript:void(0);\'"\n           + " style=\'position: absolute; left: 0px; top: 0px;"\n           + "z-index: -1; filter:Alpha(Opacity=\\"0\\");\'&gt;";\n    iframe = dojo.doc.createElement(html);\n}else{...\n</code></pre>\n\n<p>This is the most common problem with JavaScript toolkits and SSL in IE. Since IFRAME\'s are used as shims due to poor overlay support for DIV\'s, this problem is extremely prevalent. </p>\n\n<p>My first 5-10 page reloads are fine, but then the security error starts popping up again. How is this possible? The same page is "secure" for 5 reloads and then it is selected by IE as "insecure" when loaded the 6th time.</p>\n\n<p>As it turns out, there is also a background image being set in the onload event for dijit.wai (line #1325). This reads something like this;</p>\n\n<pre><code>div.style.cssText = \'border: 1px solid;\'\n                  + \'border-color:red green;\'\n                  + \'position: absolute;\'\n                  + \'height: 5px;\'\n                  + \'top: -999px;\'\n                  + \'background-image: url("\' + dojo.moduleUrl("dojo", "resources/blank.gif") + \'");\';\n</code></pre>\n\n<p>This won\'t work because the background-image tag doesn\'t include HTTPs. Despite the fact that the location is relative, IE7 doesn\'t know if it\'s secure so the warning is posed.</p>\n\n<p>In this particular instance, this CSS is used to test for Accessibility (A11y) in Dojo. Since this is not something my application will support and since there are other general buggy issues with this method, I opted to remove everything in the onload() for dijit.wai.</p>\n\n<p>All is good! No sporadic security problems with the page loads.</p>\n'}, {'answer_id': 7589230, 'author': 'ZMorek', 'author_id': 671432, 'author_profile': 'https://Stackoverflow.com/users/671432', 'pm_score': 1, 'selected': False, 'text': '<p>If you\'re using CDN you can include all modules by HTTPS as seen <a href="https://groups.google.com/group/google-ajax-search-api/browse_thread/thread/08f8643c75311d05" rel="nofollow">here</a>.</p>\n\n<pre><code>&lt;script type="text/javascript"&gt;\ndjConfig = {\n  modulePaths: {\n    "dojo": "https://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo",\n    "dijit": "https://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dijit",\n    "dojox": "https://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojox"\n  }\n};\n\n&lt;/script&gt;\n&lt;script src="https://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js" type="text/javascript"&gt;&lt;/script&gt;\n</code></pre>\n\n<p>You can test with various versions if you want.  Currently the most recent is <code>1.6.1</code></p>\n'}]
['https://Stackoverflow.com/questions/59734', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/644/']