Speed Bumps

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sloank@charter.net

    Speed Bumps

    anyone know how to set up a 'speed bump'.

    once someone clicks on an external link on my website, I want a page to come
    up that says you are leaving my site, with an OK button. once the OK button
    is clicked I want to go to the original link that was clicked on.

    any ideas.
  • Wa|stib

    #2
    Re: Speed Bumps


    <sloank@charter .net> wrote in message
    news:44651bcd$0 $22527$c3e8da3@ news.astraweb.c om...[color=blue]
    > anyone know how to set up a 'speed bump'.
    >
    > once someone clicks on an external link on my website, I want a page to[/color]
    come[color=blue]
    > up that says you are leaving my site, with an OK button. once the OK[/color]
    button[color=blue]
    > is clicked I want to go to the original link that was clicked on.
    >
    > any ideas.[/color]

    It feels like my eyes being removed by chopsticks.


    Comment

    • Jerry Stuckle

      #3
      Re: Speed Bumps

      sloank@charter. net wrote:[color=blue]
      > anyone know how to set up a 'speed bump'.
      >
      > once someone clicks on an external link on my website, I want a page to come
      > up that says you are leaving my site, with an OK button. once the OK button
      > is clicked I want to go to the original link that was clicked on.
      >
      > any ideas.[/color]

      Can't do it. The external link will go to the other server. Your server won't
      even know it happened.

      And you should ask in alt.html. This isn't a PHP question (since PHP is
      server-side only).

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • TheTeapot

        #4
        Re: Speed Bumps

        This isn't PHP, but you'd probably want to use JavaScript.
        Try something like this (attributes removed for readability):

        <html>
        <head>
        <script>
        function speedBump(){
        /*---------Code to delay exit--------*/
        }
        </script>
        </head>
        <body onunload="speed Bump()">
        </body>
        </html>

        Comment

        • John Dunlop

          #5
          Re: |OT| Speed Bumps

          sloank@charter. net wrote:
          [color=blue]
          > anyone know how to set up a 'speed bump'.
          >
          > once someone clicks on an external link on my website, I want a page to come
          > up that says you are leaving my site, with an OK button. once the OK button
          > is clicked I want to go to the original link that was clicked on.[/color]

          You're trying to slow down the people who are "leaving" by
          second-guessing them? (Metaphors are fun but can mislead: I can
          follow an external link without "leaving" your page.) In a world where
          people are always in a rush, standing in their way could well earn you
          a punch in the nose!
          [color=blue]
          > any ideas.[/color]

          Pub?

          --
          Jock

          Comment

          • Hugh Janus

            #6
            Re: Speed Bumps

            I think a better option would to use framing, have your own top frame saying
            it aint your website, and maybe a link to go back to your website. An
            option?

            <sloank@charter .net> wrote in message
            news:44651bcd$0 $22527$c3e8da3@ news.astraweb.c om...[color=blue]
            > anyone know how to set up a 'speed bump'.
            >
            > once someone clicks on an external link on my website, I want a page to
            > come
            > up that says you are leaving my site, with an OK button. once the OK
            > button
            > is clicked I want to go to the original link that was clicked on.
            >
            > any ideas.[/color]


            Comment

            • Alan Little

              #7
              Re: Speed Bumps

              Carved in mystic runes upon the very living rock, the last words of
              <sloank@charter .net> of comp.lang.php make plain:
              [color=blue]
              > anyone know how to set up a 'speed bump'.
              >
              > once someone clicks on an external link on my website, I want a page
              > to come up that says you are leaving my site, with an OK button. once
              > the OK button is clicked I want to go to the original link that was
              > clicked on.
              >
              > any ideas.[/color]

              Yep -- don't do it. It can be done quite easily with PHP, but if I were
              on your site and ran into your "speed bump", I doubt I'd be back. If I
              clicked the link in the first place, that's where I want to go. Making me
              click again is only going to be annoying.

              --
              Alan Little
              Phorm PHP Form Processor

              Comment

              • Alan Little

                #8
                Re: Speed Bumps

                Carved in mystic runes upon the very living rock, the last words of Alan
                Little of comp.lang.php make plain:
                [color=blue]
                > Carved in mystic runes upon the very living rock, the last words of
                > <sloank@charter .net> of comp.lang.php make plain:
                >[color=green]
                >> anyone know how to set up a 'speed bump'.
                >>
                >> once someone clicks on an external link on my website, I want a page
                >> to come up that says you are leaving my site, with an OK button.
                >> once the OK button is clicked I want to go to the original link that
                >> was clicked on.
                >>
                >> any ideas.[/color]
                >
                > Yep -- don't do it. It can be done quite easily with PHP, but if I
                > were on your site and ran into your "speed bump", I doubt I'd be back.
                > If I clicked the link in the first place, that's where I want to go.
                > Making me click again is only going to be annoying.[/color]

                Actually, upon further consideration, I can think of a situation where it
                might be valid, if you want to make it clear that the visitor is leaving
                your site, and you have no connection with the site they're going to. For
                example, if you were writing an article on hate groups, and wanted to
                link to some of their sites.

                So, just write a script that takes a URL in the query string, display
                your warning, and output the URL in a link. Then link to that in your
                article or whatever.

                But if it's just for, "Aww, shucks -- are you sure you want to leave my
                excellent site????" -- don't do it. You will be regarded with contempt by
                your visitors.

                --
                Alan Little
                Phorm PHP Form Processor

                Comment

                • Rik

                  #9
                  Re: Speed Bumps

                  Alan Little wrote:[color=blue]
                  > Carved in mystic runes upon the very living rock, the last words of
                  > Alan Little of comp.lang.php make plain:
                  >[color=green]
                  >> Carved in mystic runes upon the very living rock, the last words of
                  >> <sloank@charter .net> of comp.lang.php make plain:
                  >>[color=darkred]
                  >>> anyone know how to set up a 'speed bump'.
                  >>>
                  >>> once someone clicks on an external link on my website, I want a page
                  >>> to come up that says you are leaving my site, with an OK button.
                  >>> once the OK button is clicked I want to go to the original link that
                  >>> was clicked on.
                  >>>
                  >>> any ideas.[/color]
                  >>
                  >> Yep -- don't do it. It can be done quite easily with PHP, but if I
                  >> were on your site and ran into your "speed bump", I doubt I'd be
                  >> back. If I clicked the link in the first place, that's where I want
                  >> to go. Making me click again is only going to be annoying.[/color]
                  >
                  > Actually, upon further consideration, I can think of a situation
                  > where it might be valid, if you want to make it clear that the
                  > visitor is leaving your site, and you have no connection with the
                  > site they're going to. For example, if you were writing an article on
                  > hate groups, and wanted to link to some of their sites.[/color]

                  Another valid reason would be a (more or less secure) "logged in" area, and
                  displaying a warning you're leaving that area.
                  It could be done in PHP, but it would mean converting all your links, which
                  is a hassle. A quick temporary solution would be to turn on outbut
                  buffering, and searsching replacing links with preg_replace(). It's not
                  something I'd choose as a permanent solution though, it's unneccesary extra
                  memory and processing compared to doing it correctly.

                  Grtz,
                  --
                  Rik Wasmus


                  Comment

                  • newsreader

                    #10
                    Re: Speed Bumps

                    sloank@charter. net wrote:[color=blue]
                    > anyone know how to set up a 'speed bump'.
                    >
                    > once someone clicks on an external link on my website, I want a page to come
                    > up that says you are leaving my site, with an OK button. once the OK button
                    > is clicked I want to go to the original link that was clicked on.
                    >
                    > any ideas.[/color]

                    <a href="http://www.google.com/" onClick="alert( 'You are about to leave
                    this site.')">Go To Google</a>

                    Regards

                    Comment

                    • Chung Leong

                      #11
                      Re: |OT| Speed Bumps

                      John Dunlop wrote:[color=blue]
                      > You're trying to slow down the people who are "leaving" by
                      > second-guessing them? (Metaphors are fun but can mislead: I can
                      > follow an external link without "leaving" your page.) In a world where
                      > people are always in a rush, standing in their way could well earn you
                      > a punch in the nose![/color]

                      It's a common practice for government sites. The idea is that people
                      need to know they will no longer be looking at official information.

                      There is also a security dimension. Such a page helps ensure that
                      you're not leaking sensitive information through the HTTP referrer
                      field.

                      Comment

                      • ah@me.com

                        #12
                        Re: |OT| Speed Bumps

                        In article <1147537539.810 484.165090@v46g 2000cwv.googleg roups.com>,
                        chernyshevsky@h otmail.com says...[color=blue]
                        > John Dunlop wrote:[color=green]
                        > > You're trying to slow down the people who are "leaving" by
                        > > second-guessing them? (Metaphors are fun but can mislead: I can
                        > > follow an external link without "leaving" your page.) In a world where
                        > > people are always in a rush, standing in their way could well earn you
                        > > a punch in the nose![/color]
                        >
                        > It's a common practice for government sites. The idea is that people
                        > need to know they will no longer be looking at official information.
                        >
                        > There is also a security dimension. Such a page helps ensure that
                        > you're not leaking sensitive information through the HTTP referrer
                        > field.
                        >
                        >[/color]

                        Just one more example of what an appaling incompetent mess the HTML world
                        is.

                        sigh.

                        Comment

                        • John Dunlop

                          #13
                          Re: |OT| Speed Bumps

                          Chung Leong:
                          [color=blue]
                          > It's a common practice for government sites. The idea is that people
                          > need to know they will no longer be looking at official information.[/color]

                          The idea sounds fine to me, and I would even extend it further than
                          government webpages. I would have *all* links as clear as possible, so
                          that the relationship between the current page and the linked-to one is
                          obvious. (Unless there is some reason to obscure that relationship;
                          none spring to mind.)

                          I would still take issue with the setting up of a middle page to
                          achieve that end though, but from a user's perspective I can't offer
                          much in the way of argument other than my own opinion that it would be
                          a nuisance being presented with an 'are you sure?' (said in a Mrs Doyle
                          from /Father Ted/ voice) each time I followed an external link.

                          Besides, external links can be set apart in other ways. For example,
                          the title attribute of the link (e.g., title="EXTERNAL LINK: ... "),
                          the rel attr. (e.g., rel="external", with a suitable Profile), the
                          surrounding text (e.g., explain in the prose what the link is), and the
                          style of the link (e.g., an image after every external link). Those
                          can be combined to make the relationship between the two pages more
                          explicit.
                          [color=blue]
                          > There is also a security dimension. Such a page helps ensure that
                          > you're not leaking sensitive information through the HTTP referrer
                          > field.[/color]

                          Good call, hadn't thought of that. RFC2616 mentions it.

                          I think we would need to distinguish intra- from internet then.

                          --
                          Jock

                          Comment

                          • newsreader

                            #14
                            Re: |OT| Speed Bumps

                            John Dunlop wrote:[color=blue]
                            > Chung Leong:
                            >[color=green]
                            > > It's a common practice for government sites. The idea is that people
                            > > need to know they will no longer be looking at official information.[/color]
                            >
                            > The idea sounds fine to me, and I would even extend it further than
                            > government webpages. I would have *all* links as clear as possible, so
                            > that the relationship between the current page and the linked-to one is
                            > obvious. (Unless there is some reason to obscure that relationship;
                            > none spring to mind.)
                            >
                            > I would still take issue with the setting up of a middle page to
                            > achieve that end though, but from a user's perspective I can't offer
                            > much in the way of argument other than my own opinion that it would be
                            > a nuisance being presented with an 'are you sure?' (said in a Mrs Doyle
                            > from /Father Ted/ voice) each time I followed an external link.[/color]

                            Perhaps the middle page could be used to describe the external link in
                            more detail so the user can decide if it's worth the time to load the
                            page. The javascript option I posted can descibe in more detail the
                            external link, graphic intensive, only suitable for a articular browser
                            etc... or the other option is a middle page, and that doesn't require
                            anything more advanced than standard html 4.01.

                            But obviously there is a valid use for an option to decline loading the
                            external link.

                            [color=blue]
                            >
                            > Besides, external links can be set apart in other ways. For example,
                            > the title attribute of the link (e.g., title="EXTERNAL LINK: ... "),
                            > the rel attr. (e.g., rel="external", with a suitable Profile), the
                            > surrounding text (e.g., explain in the prose what the link is), and the
                            > style of the link (e.g., an image after every external link). Those
                            > can be combined to make the relationship between the two pages more
                            > explicit.
                            >[color=green]
                            > > There is also a security dimension. Such a page helps ensure that
                            > > you're not leaking sensitive information through the HTTP referrer
                            > > field.[/color]
                            >
                            > Good call, hadn't thought of that. RFC2616 mentions it.
                            >
                            > I think we would need to distinguish intra- from internet then.
                            >
                            > --
                            > Jock[/color]

                            Comment

                            • Margaret Willmer

                              #15
                              Re: Speed Bumps

                              newsreader wrote:[color=blue]
                              > sloank@charter. net wrote:[color=green]
                              >> anyone know how to set up a 'speed bump'.
                              >>
                              >> once someone clicks on an external link on my website, I want a page to come
                              >> up that says you are leaving my site, with an OK button. once the OK button
                              >> is clicked I want to go to the original link that was clicked on.
                              >>
                              >> any ideas.[/color]
                              >
                              > <a href="http://www.google.com/" onClick="alert( 'You are about to leave
                              > this site.')">Go To Google</a>
                              >
                              > Regards
                              >[/color]
                              why not just have target="blank" in the HTML - that way they still have
                              your site

                              Margaret

                              Comment

                              Working...