Solved

AJAX call over HTTPS, from HTTP page

Posted on 2007-03-27
3
258 Views
Last Modified: 2007-11-27
I have a web site where a member hits the home page in HTTP, and the login box sends their user/pass over to an HTTPS page via AJAX. This is failing since it appears the AJAX HTTP request is not allowed over HTTPS, since the origin page was HTTP.

This seems like a huge limitation! Is there a workaround, besides redirecting the user to run the whole site in HTTPS?

thanks
Eric
0
Comment
Question by:pnoeric
  • 2
3 Comments
 

Author Comment

by:pnoeric
ID: 18803297
Could this have anything to do with the SSL cert on our server? I.e. if it is flawless (not self-signed, the domain names all match properly, etc.) would it work ok?
0
 
LVL 15

Accepted Solution

by:
stanscott2 earned 500 total points
ID: 18803980
Ajax requests work over HTTPS the same way they do over HTTP.  HTTPS is not another protocol, it is merely HTTP over an SSL/TLS-encrypted connection. That encryption is transparent to the user
agent.

However, you might have the issue of making a cross-domain request.  Ajax requests must be made to the same domain as the requesting page, for security reasons.  There are ways around this -- Google "cross domain Ajax" and you'll get a wealth of resources.  I can't suggest one or the other, because I don't know your setup and what exactly you're doing.
0
 

Author Comment

by:pnoeric
ID: 18862199
Yeah, no luck, it's a cross-domain issue, even though it's not really across a different domain, it's just going from HTTP to HTTPS. bummer.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now