Solved

AJAX call over HTTPS, from HTTP page

Posted on 2007-03-27
3
269 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
[X]
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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s 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…

688 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