Is it possible to automatically detect whether or not the page is accessed via http or https and then include a https://url.js or http://url.js ?
Is javascript included via https any different? I'm talking about cache age and so on?
Thanks, Wesley
Is it possible to automatically detect whether or not the page is accessed via http or https and then include a https://url.js or http://url.js ?
Is javascript included via https any different? I'm talking about cache age and so on?
Thanks, Wesley
Use a protocol-relative link, starting with //
instead of http or https
:
<script type='text/javascript' src="//path/to/file.js"></script>