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

T

Tamer

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
 
J

Jim Ley

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.
 
A

António Marques

Tamer said:
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...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top