Mobile app version of vmapp.org
Login or Join
Sent6035632

: A POST request on a page with HTTPS is done automatically in HTTPS? If I make a request to page.php (AJAX) with JavaScript from a HTTPS page, the request is automatically made ​​page.php

@Sent6035632

Posted in: #Ajax #Https #Javascript

If I make a request to page.php (AJAX) with JavaScript from a HTTPS page, the request is automatically made ​​page.php directly with HTTPS or HTTP? If HTTP, how to send a request (to the same domain) with HTTPS with pure JavaScript?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

More information is needed to be 100% sure (code sample, framework, ...), but the likely answer is yes.

If you POST with a relative URL, then the same host/port as the current page will be used.

You can open Chrome/Firefox's inspector to see how the browser actually made the request.

If you give the browser an absolute URL, then you can specify the http/https in the URL.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme