Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

AJAX call over HTTPS, from HTTP page

Posted on 2007-03-27
3
259 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
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…

840 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