If I activate SSL and then on checkout I got error for prototype!

Block loading mixed active content

  • Are you using Firefox 23? – philwinkle Jun 27 '13 at 19:27
  • I check on firefox 22, chrome 27 and IE 9. As I can go deep getURL is not sending secure url... – Sandesh Jun 28 '13 at 8:55
  • What is the src that getURL is loading? Can you paste what the output of getURL is? – philwinkle Jun 28 '13 at 13:12
  • getURL generate proper URL of JS file with http:// in src, but when I enabled SSL on frontend from admin then URL must be https:// but actually URL is http:// hence checkout page through errors!! I am tring to find out why but still no luck... – Sandesh Jun 28 '13 at 14:45

This is happening because scripts are being loaded in your theme via HTTP only. Scripts downloaded via HTTP cannot be executed via HTTPS. You should load your scripts using the protocol-agnostic method:

Instead of:

<script src="http://mysite.com/js/somefile.js"></script>

Use this:

<script src="//mysite.com/js/somefile.js"></script>

I doubt this is happening with Prototype.js as Magento should be loading this the correct way. However, if that is the case, your custom package/theme may be loading scripts incorrectly. Read some tutorials on how to set these up to append to the <head> via Layout XML.

Here are a few links:



  • As I can go deep in probelm: getURL is not sending secure url ... – Sandesh Jun 28 '13 at 8:57

I know this is a little old but just in case that somebody needs this... If you're using getUrl and this url must be secure, you need to pass it this as a parameter


Mage::getUrl('', array("_secure"=>true));

I don't know if there's a easy way without changing all your getUrl but this works.

  • 1
    You can also use $this->getUrl('',array('secure'=>$this->getRequest()->isSecure())) to conditionally apply the security :). – easymoden00b Feb 13 '15 at 14:57
  • Oh that's great, I was looking for something like that because the mixed content is a problem. Thank you. – Natalie Feb 13 '15 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.