Are there any web browsers that automatically switch to a non-SSL connection if an attempt to connect with SSL

I regularly utilize jQuery along with jQuery.ajax to make connections between pages. I am interested in establishing a connection from a non-SSL page to an SSL page using ajax.

Are there any web browsers that will attempt to connect via non-SSL if the connection to the SSL server fails when using ajax?

In other words, if this code snippet does not work,

$.post('https://xxxxxx')

would the browser automatically try to connect to "" instead? Is there any browser that behaves this way?

I am curious about the potential security risks associated with utilizing jQuery.ajax.

Although I personally find this behavior illogical, I would like some evidence to confirm that all browsers do not exhibit this automatic switch. What resources should I consult? I have read the WC3 XMLHttpResponse documentation, but is it universally applied by all browsers?

Answer №1

When you specify https in your ajax call URL, the browser will not attempt to try http since it has not been requested. This is crucial for security reasons.

Just imagine being on your bank's website and their https connection fails. It would be illogical to even consider trying to connect via http.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

complex selection challenge

I'm curious about how to target a specific class within the parent element of an element. Can you help with that? ...

encountering an issue with the react hook useHistory leading to an error

I recently encountered an issue while implementing useHistory() in my code. Previously, I had used it without any errors, but now I'm getting the following error in this component: Line 6:18: React Hook "useHistory" is called in function "showPost" ...

Having trouble with accessing an element that contains both onclick and text attributes in Selenium Webdriver?

The HTML code I'm dealing with includes this element: <a style="text-decoration:none; font-weight:normal;" href="javascript:void(0);" onclick="CreateNewServiceItemApproved();"> <img src="icons/ui/addnew.png"> <span style="color:# ...

creating a powerful ajax search feature for mysql databases

Currently, I am developing a search engine for a small database, but I believe that my approach to constructing it has been somewhat bloated. Does anyone have any suggestions on how to streamline the AJAX code? Here is a snippet of my ajax.php file... < ...

Retrieving all users in Sqlite database with a specific value

I am looking to identify and access each user who has a specific value in their row. Here is an example code snippet of what I want: sql.prepare("SELECT * FROM raid WHERE raid1 > 0 AND NOT id='685337576810610734'").get().forEach(async (user) ...

Leveraging Emotion API in Video Content (JavaScript or Ruby)

Currently, I'm in the process of uploading a video to the Emotion API for videos, but unfortunately, I have not received any response yet. I managed to successfully upload it using the Microsoft online console. However, my attempts to integrate it in ...

You can disregard the first option in a multiple select box using jQuery

Imagine having multiple select boxes with the same options that are mutually exclusive. For instance, if Select Box A and Select Box B both have Option 1, Option 2, and Option 3, selecting Option 1 for Select Box A should make it unavailable in Select Box ...

In the realm of asp.net mvc, JSON remains a mysterious and undefined

When working with ASP.NET MVC 3, I have encountered an issue regarding JSON in my AJAX calls. The application runs smoothly on my development machine when using Visual Studio. However, after publishing the same application and trying to access it through a ...

Unable to retrieve button value with material-ui package

My task requires me to retrieve the value of a button, as it contains an ID essential for further steps. Initially, I used a standard button with Bootstrap styling and everything functioned correctly. <button value={row.vacationRequestID} c ...

Automate the execution of webdriver/selenium tests when a form is submitted

I am currently faced with a challenge in setting up an application that will automate some basic predefined tests to eliminate manual testing from our workflow. The concept is to input a URL via a user-friendly form, which will then execute various tests ...

Issue encountered while trying to implement a recursive function for mapping through nested elements was not producing the

I am currently working on recursively mapping through an array of nested objects, where each object can potentially contain the same type of objects nested within them. For example: type TOption = { id: string; name: string; options?: TOption; } con ...

What are the steps to implement a queue structure using AJAX?

https://i.stack.imgur.com/RAfAt.png I'm wondering how to upload files consecutively after selecting the overwrite upload or rename upload buttons. Currently, when I press these buttons, I am able to go back and select multiple files for upload at onc ...

The Protected Routes in React Router Dom persistently redirecting

I am currently implementing protected routes in my Redux and Pure React app using React Router Dom. The issue I am facing is that when I navigate to /profile/edit and then refresh the page, it automatically redirects me to /login and then to /profile. I ha ...

Attempting to create an array using jQuery's :checked selector

In my table structure below, I have multiple rows with various data: <tr class="row"> <td class="row-checkbox-delete-row"> <input tabindex="-1" class="checkbox-delete-row" type="checkbox" /> </td> <td class="r ...

Easy Steps for Mapping Json Data into an Array

Here is the JSON Format I am working with: { "Data": { "-template": "Parallax", "Explore": { "IslandLife": { "TourismLocation": [ { "Title": "Langkawi", "Latitude": "6.350000", "Longitude": "99.800000", "YouTub ...

The use of jQuery's ajax() function to retrieve JSON data from a URL is resulting in a response that is

I am facing an issue where the data object received in my complete() callback is not a JSON object, but rather an [Object object]. Despite this, I can still see a string of my JSON response in data.responseText. Below is my jQuery .ajax request: $.ajax({ ...

How can you verify user identity in Firebase when making a call to a cloud function on a

I have integrated Firebase into my React Native app, and I have only enabled anonymous login feature. Currently, I am attempting to invoke a Cloud Function from the app without utilizing the firebase SDK. Instead, I intend to make the call using axios. De ...

The AngularJS HTTP interceptor is a crucial component for handling

Is there a way to use an interceptor in AngularJS to log "finished AJAX request" when any request is completed? I've been exploring interceptors and currently have the following setup, but it triggers at the beginning of the request rather than the e ...

Wait for Axios Request Interceptor to complete before sending another ajax call

One feature I have added is a request interceptor for all axios calls. This interceptor checks the JWT token and automatically refreshes it if necessary. axios.interceptors.request.use((config) =>{ const currentState = store.getState(); // get upd ...

Sending data with a post request using Ajax in ASP.NET MVC 3

Hey everyone, I'm working on an ajax login call. I'm serializing the form data and sending it to the server to get a redirect URL link. However, I'm running into an issue where my URL after the post ends up looking like http://localhost:508 ...