2

I am trying to code a website that uses PHP protocol toggling to switch from HTTP and HTTPS on the fly but since I have coded my website in JQuery mobile now, it seems to just hit the "error loading page" and never loads those sections of my website. What might be causing that?

ElliotDurden
  • 49
  • 1
  • 6

2 Answers2

1

Although it is slightly different in nature, this question will help you resolve your issue: AJAX calls to untrusted (self-signed) HTTPS fail silently.

Because you are most likely using a self-signed certificate or a certificate for a different subdomain, AJAX calls will fail by default since they cannot accept the certificate for security purposes.

Community
  • 1
  • 1
Mike Mackintosh
  • 13,917
  • 6
  • 60
  • 87
  • 1
    This solution sort of worked, the problem with Jquery Mobile is that it doesnot do full page rendering of the page, so I since I was switching back and forth between HTTP and HTTPS on my website, I had to make sure the link to the pages was either "external" rel or disable ajax and then do it and re-enable after successful page visit. This seems to solve the error just not completely fix it. – ElliotDurden Sep 04 '12 at 13:39
1

You can add rel="external" in every tag to redirect to from http => https or https => http

cowboybkit
  • 1,013
  • 7
  • 4