Using Ajax in HTTPS

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Using Ajax in HTTPS

Post by kendall »

Hello,

I'm using Adobe's Spry's loadURL to send and recieve a response from a PHP script. using a "relative" url path.

when the page is loaded in https Spry gives me a (the spry content is actually being "included" into the page loaded via https)
Error: uncaught exception: Security Error: Content at https:// may not load data from http://

if the page was loaded via https why does Spry loadURL from http when the url path is set to relative?

the php script simply "prints $response;" if ajax request were in https is it safe to assume that the print response would be https as well?
User avatar
The Phoenix
Forum Contributor
Posts: 294
Joined: Fri Oct 06, 2006 8:12 pm

Re: Using Ajax in HTTPS

Post by The Phoenix »

kendall wrote:Hello,

I'm using Adobe's Spry's loadURL to send and recieve a response from a PHP script. using a "relative" url path.

when the page is loaded in https Spry gives me a (the spry content is actually being "included" into the page loaded via https)
Error: uncaught exception: Security Error: Content at https:// may not load data from http://

if the page was loaded via https why does Spry loadURL from http when the url path is set to relative?

the php script simply "prints $response;" if ajax request were in https is it safe to assume that the print response would be https as well?
Most likely the page includes both https items AND http items (extremely common on secure sites). That generates a warning (not an error) in most web browsers, but apparently it generates an error for spry.

As an example, if the page loaded images, it might come from a http url. (same for javascript, css, etc).
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

phoenix(lol@ the dr. evil look)...

i was thinking the same thing....except that when i analyzed the error which stated
"that it may not load 'from' http"
i'm assuming that the "response" is being sent back as http and not https...

it this likely?
Post Reply