How to determine if IE supports my site as a trusted site?

Can I determine if my website is accessible as a reliable site? In another question, we determined that, in general, it is unsafe to have access to the IE client settings. Will this qualify as an exception?

The reason I would like to do this is because some functions will not work if the site is not accessible as a trusted site (for example, on the sendmail client side - do not ask), and I would like to be able to alert users . Despite the many warnings on the pages, many users still do not read and send us nastygrams. We would like to reduce the volume of email by detecting this condition and launching a big warning that basically says: β€œ You have not read the warnings, and what you are trying to do will not work until you change the settings! ” Any ideas are welcome .

EDIT: in our store, sendmail client mail only works if the site is trusted, and I can’t change it due to security requirements, and I can’t switch to server sendmail either. However, this is not the only reason client sendmail will not work, so I cannot just catch the sendmail error to determine this. Also, I don't want this to get worse before the discussion in sendmail.

+6
javascript internet-explorer settings
source share
5 answers

Here you can use the test:

function isTrustedIE(){ try{ var test=new ActiveXObject("Scripting.FileSystemObject"); } catch(e){ return false; } return true; } 

This, of course, will fail if the user has disabled this particular object even on a trusted site.

+2
source share

from my understanding this is impossible, but you may have some kind of luck test for a more specific condition, for example, the presence of the specific technology or technologies that you need. What are the requirements for your client code in a browser (ActiveX, Java, scripts, etc.)? Knowing this will be a very good start to figure out how to test the client browser for the environment required by your client code.

0
source share

You can request a username for the current user, if you recognize him, you will find out that the site is located in the Trusted Sites or Local Intranet zones.

0
source share

Perhaps a good way to handle this, while supporting unusual combinations, is to check if a particular behavior was successful.

For example, if you need to do

 a.innerHTML = "abc"; 

then you can check if innerHTML has been changed. Unfortunately, I cannot assure you that all functions can be detected. Also, try ... catch statements can be very helpful.

0
source share

In your situation (where the specific problem you're dealing with is sendmail's failure), I still suggest catching sendmail, but then giving a slightly more general answer. Msgstr "Your mail failed. It may have failed for any of the following reasons," and then enter a catchy list with "did not make this site reliable" in a beautiful and bold type at the top. If sendmail does not work for reasons other than that your site is not trusted, your users may also need to be aware of this.

0
source share

All Articles