I am building an ASP.NET MVC 3 app which will run in Azure. Everything was working well, until I switched to https. Now most of my jQuery plugins and some other javascript are not secure.
I'm using the Datatables library as well as jsTree, Watermaks and Breadcrumbs. Most of this script is to make our site look appealing.
Is there a way to make this secure? Or is it time to move a very lean javascript site?
Thank you for the help!
The jQuery site itself does not support https:// as a host. My suggestion is to download the latest version and host it yourself with a relative path (eg. /js/jquery.js
) so it will match your protocol. As a side note, removing the protocol from the beginning of an absolute path will match the protocol that the user is browsing in. Like so:
<script src="//www.google.com/someresource.js"></script>
will link to either http or https depending on the current url the user is browsing.
Just load your scripts via https
instead of http
... seems obvious enough.
If you are loading them from a CDN, check if said cdn has a https
option, if not, you'll need to serve them yourself through the same https
protocol you are using for the rest of your site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With