Search code examples
javascripthttpdomhttpscross-site

window.open from a https to http, and from https to http


first of all, this is really important for my website, I need to open a specific http page

I want to know if its a good practice to use window.open to open a page with different protocol (like http -> https | https -> http)

It works in my computer, but I'm not sure if it works with other browsers and OSes.

ChatGPT told me that this is not allowed but I can't see someone on the internet saying that this is not allowed.


Solution

  • HTTP and HTTPS are protocol standards independ of OS, whatever works on Windows should work on other platform.

    Back to your question, you can pretty much redirect http traffic to https but not recommended the other way round. I am not sure there is any incentive to moving from secured protocol (https) to non-secured protocol (http).