how to change from "http" to "https" without reloading the site.

Discussion in 'Javascript' started by Tamer, Jan 20, 2008.

  1. Tamer

    Tamer Guest

    Hi!
    Is there a way to change the protocoll type through Javascript without
    reloading (or making a request from the webserver) via Javascript?

    for example:

    http://mydomain.com -> https://mydomain.com

    and backwards (if possible).

    I want only to change the protocoll BUT NOT making a new server request.

    That's all.


    For any advise and help from your side I would thank you very much!


    Tamer
    Tamer, Jan 20, 2008
    #1
    1. Advertising

  2. Tamer

    Jim Ley Guest

    On Sun, 20 Jan 2008 19:28:21 +0200, Tamer <> wrote:

    >Hi!
    >Is there a way to change the protocoll type through Javascript without
    >reloading (or making a request from the webserver) via Javascript?
    >
    >for example:
    >
    >http://mydomain.com -> https://mydomain.com
    >
    >and backwards (if possible).
    >
    >I want only to change the protocoll BUT NOT making a new server request.


    Of course not, the very sites are completely different, https and http
    are simply different things.

    Jim.
    Jim Ley, Jan 20, 2008
    #2
    1. Advertising

  3. Tamer wrote:
    > Hi! Is there a way to change the protocoll type through Javascript
    > without reloading (or making a request from the webserver) via
    > Javascript?
    >
    > for example:
    >
    > http://mydomain.com -> https://mydomain.com
    >
    > and backwards (if possible).
    >
    > I want only to change the protocoll BUT NOT making a new server
    > request.
    >
    > That's all.


    No... the protocol here is the way information is transmitted between
    client and server. http simply sends clear data from one to another,
    while https first establishes a session with keys for both end points
    and then transmits the data encrypted. When you see 'https' in yout url
    bar, it means that whatever you're viewing in your browser has *already*
    been received in encrypted form. Conversely, if you see 'http', it means
    that no encryption *has been* used. Logically, you cannot, through
    javascript or any other means - except maybe a time machine - alter the
    protocol in your url bar, because that url reflects a *past*,
    *completed*, use of the protocol.

    In simple terms: you received an page delivered unencryptedly. It's
    done. If you so wish, you may ask for an encrypted delivery - bot only
    for a *new* request. It's as if you'd received a packet through DHL -
    you can't change that fact and receive it through UPS instead, unless
    you order it again.

    IF your problem is how to preserve the info sent in the first request -
    so that the user doesn't have to provide all that info again - then a
    number of options are available... keep the info on the server, keep the
    info in some hidden place on the page, keep the onfo in the url, keep
    the info in a cookie...

    --
    Posted via a free Usenet account from http://www.teranews.com
    António Marques, Jan 21, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Urs Vogel
    Replies:
    2
    Views:
    2,392
    Urs Vogel
    Jun 10, 2004
  2. Andrew Hayes
    Replies:
    2
    Views:
    418
    Andrew Hayes
    Jun 16, 2009
  3. Po-Shan Chang
    Replies:
    1
    Views:
    220
    Bernard
    Mar 5, 2004
  4. Wladimir Borsov
    Replies:
    4
    Views:
    282
    Tintin
    May 11, 2006
  5. Replies:
    2
    Views:
    182
Loading...

Share This Page