Question

I used Jquery Colorbox lightbox plugin in order to let users to login to my site ,this plugin use signin.aspx page (which i made) in order to evaluate the user's credentials, but the problem is when someone try to signin ,I'm facing this error: Blocked a frame with origin "http://www.example.com" from accessing a frame with origin "https://www.example.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match. Any Idea(s)? I would really appreciate

Was it helpful?

Solution

The page the frame is on and the page you are loading into the lightbox (signin.aspx) must both be on the same domain (including protocol). This is called the Same Origin Policy.

If you want the popup to always be the same protocol, use a protocol-less url:

//example.com/signin.aspx

This will then use the protocol of the parent document (http or https)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top