I’m using a third party JS file. And they have both http and https version.
My site have some pages loading in https while most of pages are in http.

Now my question is could I do something in header.php so if my page is in https it will load the https version JS, otherwise load the http version?

Thank you!

2 Answers
2

If you link to the JS file just using something like //examplesite.com/js/jsfile.js without the http:// or https:// the browser should automatically get the correct http or https version

Leave a Reply

Your email address will not be published. Required fields are marked *