Determining Trusted Site using javascript

Discussion in 'Javascript' started by dlawner@gmail.com, Feb 14, 2008.

  1. Guest

    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.
    , Feb 14, 2008
    #1
    1. Advertising

  2. On Thu, 14 Feb 2008 12:55:45 -0800, dlawner wrote:

    > 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.
    Jeremy J Starcher, Feb 14, 2008
    #2
    1. Advertising

  3. wrote:

    > 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,

    --
    Bart
    Bart Van der Donck, Feb 15, 2008
    #3
  4. Jeremy J Starcher wrote:
    > 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
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
    Thomas 'PointedEars' Lahn, Feb 17, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. T.

    Trusted Site

    T., Nov 19, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    551
    Ken Dopierala Jr.
    Nov 20, 2004
  2. Larry Page
    Replies:
    1
    Views:
    381
    Bruce Barker
    Sep 16, 2005
  3. Kam
    Replies:
    2
    Views:
    181
    Anthony Jones
    Sep 11, 2006
  4. RR

    Add site to trusted sites

    RR, Nov 24, 2003, in forum: Javascript
    Replies:
    11
    Views:
    316
  5. Replies:
    0
    Views:
    114
Loading...

Share This Page