Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is https retained on relative form action URLs?

Tags:

html

forms

url

ssl

Consider a page with a form that is visited via https. If the form action has a relative URL to the form page, is the https protocol retained?

Ex: you visit:

https://example.com/cart.html

which contains the form tag:

<form name="form1" method="post" action="SubmitOrder.aspx" id="form1">

Is the form submitted via https or http?

like image 249
Robot Avatar asked Oct 19 '09 15:10

Robot


2 Answers

Yes, because it's a relative path.

like image 99
Trevor Avatar answered Oct 10 '22 11:10

Trevor


Yes, relative paths always stay. Direct URLs are only needed when switching between http/https or vice versa.

like image 38
Danny Maya Avatar answered Oct 10 '22 10:10

Danny Maya