title: Insecure Content Warning for content served over http from Javascript File on Codeigniter Site
body: <p>Google Chrome is returning an insecure content warning for content served on some of my pages. The content is called by a Javascript file in the assets/js directory in Codeigniter.
  The Javascript file is loaded in the footer by reference to the js_asset_url, set out in the asset_helper file.</p>
  
  <pre><code>&lt;script src="&lt;?php echo js_asset_url('script.js'); ?&gt;"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I only use SSL on specific controllers, hence the assets folder content is currently loaded insecurely and worries users due to the warning displayed. Does anyone have a solution for Codeigniter to force assets such as .js files to load via SSL?</p>
  
  <p>EDIT:
  I finally fixed using an external reference source (hope it's ok to post the link!)
  <a href="http://www.davidnard.com/2011/04/easy-ssl-redirection-in-codeigniter/" rel="nofollow">http://www.davidnard.com/2011/04/easy-ssl-redirection-in-codeigniter/</a>
  The content being called by the .js file was for 2 functions within a controller. Setting the relevant controller in the $partial array (see above link) did the trick.</p>