开发者

Display 'Accept digital certificate' prompt using PHP and Javascript

开发者 https://www.devze.com 2023-02-07 13:59 出处:网络
I\'m developing a GIS: a web client to see some maps loaded from OGC servers. The user can switch between use HTTPS connections and HTTP to load the maps, so I want to include some link to provide th

I'm developing a GIS: a web client to see some maps loaded from OGC servers.

The user can switch between use HTTPS connections and HTTP to load the maps, so I want to include some link to provide this funcionallity (because some maps can be loaded from an HTTPS url like this https://serverurl/ogc/... and others can be loaded from a classical HTTP url).

When the user click on the link, it should display 'Digital Certificate' prompt on browser (to a开发者_开发知识库llow the user accept or deny the certificate).

Is there any way to display this message to the user using Javascript or PHP?

Thanks in advance!

PS: the URLs are external, so creating an IFRAME like this doesn't work:

<IFRAME style="border: 0px;" SRC="https://externalurl/" width="100" height="100" >

With this error inside it:

This frame has been blocked because it contains some unsecure content

Only Chrome and IE show me that error. Firefox is able to load the prompt what I'm looking for, but only inside the frame.

I really appreciate if someone knows how to load this prompt at the entire webpage.


I'm fairly sure there is no way to trigger this dialogue except pointing the browser to an actual resource where it would pop up anyway - loading such a resource in an invisible iframe should be enough to provoke it, for example. But you will definitely not be able to order the browser to show that specific dialog: It comes from the browser's security layer, and must by definition be outside the page's reach.

0

精彩评论

暂无评论...
验证码 换一张
取 消