Posts Tagged ‘https’

Using the same URL disregarding the protocol (http/https)

January 25th, 2013

If you are running your development on HTTP but testing, QA and production on HTTPS you might have stumbled on

Do you want to view only the web page content that was delivered securely?

Do you want to view only the webpage content that was delivered securely

“Do you want to view only the webpage content that was delivered securely” dialogue.

The culprit might be your site loading stuff through HTTP while the site is run through HTTPS; the browser doesn’t like that.

Solution:

Instead of rewriting everything to HTTPS or create a deploy transformation to have different versions in dev, test and the rest just abandon the protocol.

E.g. use:

1
<script type="text/javascript" src="//www.otherexamplesite.com/cdn/jquery.js"></script>

instead of

1
<script type="text/javascript" src="https://www.otherexamplesite.com/cdn/jquery.js"></script>

Happy hacking!