Determining Trusted Site using javascript

D

dlawner

Anyone know a way to determine if a particular url is a trusted site
using javascript? I need to validate that a site is trusted before the
user logs on.
 
J

Jeremy J Starcher

Anyone know a way to determine if a particular url is a trusted site
using javascript? I need to validate that a site is trusted before the
user logs on.

Do you mean Trusted Site as Internet Explorer has categories, or sites
that are trusted by a particular set or rules?

If you mean the first, you might want to ask on a MS forum if one can
access that data through MS scripting objects.

That information is not available in the Javascript standard library.

(*) Ok, there isn't a real standard library -- I know what I mean just
not how to phrase it.
 
B

Bart Van der Donck

Anyone know a way to determine if a particular url is a trusted
site using javascript? I need to validate that a site is trusted
before the user logs on.

Do you mean a website that connects over TLS (previously SSL) ? In
that case you could check whether the URL starts with 'https://'
rather than 'http://'.

if (/^https:\/\//i.test(self.location.href))
alert('This page uses the TLS protocol.');

http://en.wikipedia.org/wiki/Transport_Layer_Security

Hope this helps,
 
T

Thomas 'PointedEars' Lahn

Jeremy said:
That information is not available in the Javascript standard library.

(*) Ok, there isn't a real standard library -- I know what I mean just
not how to phrase it.

What about "That information is not available without the use of an API."?


HTH

PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top