I've been trying to figure this out for a while, but haven't come across any answers that have been useful for my particular case.
I have a very basic HTML page that serves as a front end for a webapp I've made. There are two forms on said page - one to register for an account, and one to log in with an existing account. The idea is that if you register or log in, you'll be served the actual webapp.
Currently, I have this working, but the form contents get displayed in the URL on submission. This is both not that good looking (since the webapp URL becomes url.com/?username=user&password=pass
instead of just url.com
), and also insecure, since any onlooker would be able to clearly see what the username/password is.
I've tried using jquery forms to submit this using ajax instead, and I am successfully able to see and process this request on my server, but upon returning a new HTML page to the client, the browser no longer loads this new page. I understand that jquery/ajax was made (at least in part) to enable interactive features in a webpage without having to refresh the entire thing, but is there any way to use it to achieve such a thing?
alternatively, does anybody have any other ideas on how I can achieve my goal?
Also, just to make sure - if I wanted to submit this over SSL (which I do eventually), I would just need to alter the URL that this form is being submitted to to include an https instead of an http, correct?
Best, and thanks,
Sami