title: javascript window.location remove SSL protocol
body: <p><strong>EDITED</strong>: THIS WAS A SERVER REDIRECT ISSUE, not sure if question should be deleted.</p>
  
  <p>I'm in a page with valid SSL certificate lets say: </p>
  
  <pre><code> https://www.example.com/something 
  </code></pre>
  
  <p>I execute this:</p>
  
  <pre><code> window.location = '/other/folder';
  </code></pre>
  
  <p>And the redirection goes to a non SSL version:</p>
  
  <pre><code> http://www.example.com/something 
  </code></pre>
  
  <p>Anyone know why and how to prevent that?</p>
  
  <p>(I want to understand why this happend so dont ask me to just add https:// at the beginnin), Thanks!</p>