title: Codeigniter - jquery.min.js:4 Mixed Content: the content must be served over HTTPS
body: <p>I have a JS script that post data via AJAX. When I put the script on my server, the posting URL is https but when I view the js via view page source online, the URL starts with http.</p>
  
  <p>I am receiving the below error.</p>
  
  <p>jquery.min.js:4 Mixed Content: The page at '<a href="https://www.mywebsite.com/" rel="nofollow noreferrer">https://www.mywebsite.com/</a>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<a href="http://www.mywebsite.com/bookmark" rel="nofollow noreferrer">http://www.mywebsite.com/bookmark</a>'. This request has been blocked; the content must be served over HTTPS.</p>
  
  <p><strong>Script on server</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).on("click","#bookmark",function(a){a.preventDefault();var t=$(this).attr("bookmark_id"),e=$("input[name=msmm_tn").val(),s=$(this);$.ajax({type:"POST",url:"https://www.mywebsite.com/bookmark",data:{msmm_tn:e,bookmarkid:t},dataType:"json",success:function(a){"X"==a.status&amp;&amp;(s.find("i").addClass("green"),s.removeAttr("href"))}})})</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I click the js file in my web browser, the https:// is http. I cannot figure out why.</p>