Archived from the Transloadit support forum. Originally posted on January 13, 2011; details may be outdated, see our docs for current behavior. Original thread
In your jQuery documentation, you present some JavaScript intended to select automatically between HTTP and HTTPS based upon the browser’s current protocol. This is much, much easier to do by simply using a protocol-relative URL. They’re obscure (and gaining popularity), but universally supported.
You provide:
var tlProtocol = (('https:' == document.location.protocol) ? 'https://' : 'http://');
document.write(unescape("%3Cscript src='" + tlProtocol + "assets.transloadit.com/js/jquery.transloadit2.js' type='text/javascript'%3E%3C/script%3E"));
Easier (and better?) is:
<script src="//assets.transloadit.com/js/jquery.transloadit2.js"></script>