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