Intercepting offsite links

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Intercepting offsite links

Patrick Larkin-2
Hi again -

I'd like to have a method of intercepting a link that leaves the main site and presents the user with a blurb that they are now leaving the site.  I thought about making a Lasso page that I could feed the URL and present the message and then redirect after a set period of time.  I was wondering if there was any other way - possibly through Apache - to do this so I  could just put external links and not have to worry about the Lasso page.  

There is the benefit of being able to display the offsite message on URLs that I want to display it for if I use a Lasso page.  For instance, I would want the message to display if it was going to any server or site that I did not directly control.  But there may be a case where I want to send the user to one of my other servers and not have the message displayed.  

Anyone doing anything like this?


Patrick Larkin
Developer/Administrator of Special Systems / Webmaster
Bethlehem Area School District




#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Intercepting offsite links

Wade Maxfield
On 25/07/2012, at 6:19 AM, Patrick Larkin wrote:

> Hi again -
>
> I'd like to have a method of intercepting a link that leaves the main site and presents the user with a blurb that they are now leaving the site.  I thought about making a Lasso page that I could feed the URL and present the message and then redirect after a set period of time.  I was wondering if there was any other way - possibly through Apache - to do this so I  could just put external links and not have to worry about the Lasso page.  
>

How would YOUR Apache receive the request since as soon as the user clicks the external link off they go to that external site.  You never get to see the click.

> There is the benefit of being able to display the offsite message on URLs that I want to display it for if I use a Lasso page.  For instance, I would want the message to display if it was going to any server or site that I did not directly control.  But there may be a case where I want to send the user to one of my other servers and not have the message displayed.  
>
> Anyone doing anything like this?
>


I'm doing something that could be reappropriated to what you want.  I'm marking external links with an icon so that people have a visual cue that this link is going to take them somewhere else.

To do this I've trained all the people who edit content on this site to always use relative URLs and only to use http:// or https:// on URLs for other sites.

Then with jQuery on each page I have:

$("a[href^='http']").not("[href*='mysite.com']").addClass("extlink");

Rather than adding a class you could change that to a click function that opens your message - as an alert message using jQueryUI or similar, or by rewriting the URL to bounce by a lasso page that shows your message, etc.

 - Wade


#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Intercepting offsite links

stevepiercy
The IRS does it this way:
http://www.irs.gov/efile/article/0,,id=98005,00.html?portlet=106

Scroll down to:

    EFTPS Enrollment

    To enroll, or for more information on enrollment, visit  EFTPS or call
    EFTPS Customer Service to request an enrollment form:

Click the first EFTPS link:
http://www.irs.gov/app/scripts/exit.jsp?dest=http%3A%2F%2Fwww.eftps.gov

I suspect that their Java server detects the referrer URL so that you cannot do this:
http://www.irs.gov/app/scripts/exit.jsp?dest=http%3A%2F%2Fwww.yougotrickrolled.com

The IRS is so no fun at all.

--steve


On 7/25/12 at 10:55 AM, [hidden email] (Wade Maxfield) pronounced:

> On 25/07/2012, at 6:19 AM, Patrick Larkin wrote:
>
> > Hi again -
> >
> > I'd like to have a method of intercepting a link that leaves the main site and
> presents the user with a blurb that they are now leaving the site.  I thought
> about making a Lasso page that I could feed the URL and present the message and
> then redirect after a set period of time.  I was wondering if there was any other
> way - possibly through Apache - to do this so I  could just put external links and
> not have to worry about the Lasso page.  
> >
>
> How would YOUR Apache receive the request since as soon as the user clicks the
> external link off they go to that external site.  You never get to see the click.
>
> > There is the benefit of being able to display the offsite message on URLs that I
> want to display it for if I use a Lasso page.  For instance, I would want the
> message to display if it was going to any server or site that I did not directly
> control.  But there may be a case where I want to send the user to one of my other
> servers and not have the message displayed.  
> >
> > Anyone doing anything like this?
> >
>
>
> I'm doing something that could be reappropriated to what you want.  I'm marking
> external links with an icon so that people have a visual cue that this link is
> going to take them somewhere else.
>
> To do this I've trained all the people who edit content on this site to always use
> relative URLs and only to use http:// or https:// on URLs for other sites.
>
> Then with jQuery on each page I have:
>
> $("a[href^='http']").not("[href*='mysite.com']").addClass("extlink");
>
> Rather than adding a class you could change that to a click function that opens
> your message - as an alert message using jQueryUI or similar, or by rewriting the
> URL to bounce by a lasso page that shows your message, etc.
>
>  - Wade
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Intercepting offsite links

Douglas Burchard
In reply to this post by Patrick Larkin-2
On Jul 24, 2012, at 11:19 AM, Patrick Larkin wrote:

> I'd like to have a method of intercepting a link that leaves the main site and presents the user with a blurb that they are now leaving the site.  I thought about making a Lasso page that I could feed the URL and present the message and then redirect after a set period of time.  I was wondering if there was any other way - possibly through Apache - to do this so I  could just put external links and not have to worry about the Lasso page.  
>
> There is the benefit of being able to display the offsite message on URLs that I want to display it for if I use a Lasso page.  For instance, I would want the message to display if it was going to any server or site that I did not directly control.  But there may be a case where I want to send the user to one of my other servers and not have the message displayed.  


I would use a define_atend construct, to color any link within an action or form, starting with http (or any other protocol), and not starting with the current server_name. Read the Lasso 8 Language Guide (I don't think there's much on this in the Lasso 9 guide) regarding define_atend. You'll probably end up using regular expressions to to do the actual coloring.

You'll want to refine your regular expression (I doubt this one works), and this is totally untested. But, the code should look something like the following:

define_atend => {
        content_body = string_replaceregexp(
                content_body,
                -find=`(href|action)(\s*=\s*"?)http://(.+?)("?\s)`,
                -replace=`\1\2/outsidelink.lasso?link=http://\3\4`
        )
}


--
Douglas Burchard
Certified Lasso Developer
15024 NE 66th Street
Redmond, WA  98052, USA

direct: (206) 227-8161
[hidden email]
http://www.douglasburchard.com/
http://www.linkedin.com/in/douglasburchard



#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Intercepting offsite links

Marc Vos
In reply to this post by Wade Maxfield
The "window.onbeforeunload" javascript event may be of some use for detecting if a user leaves your page.

- -
Marc


On Jul 25, 2012, at 12:55 AM, Wade Maxfield <[hidden email]> wrote:

On 25/07/2012, at 6:19 AM, Patrick Larkin wrote:

> Hi again -
>
> I'd like to have a method of intercepting a link that leaves the main site and presents the user with a blurb that they are now leaving the site. I thought about making a Lasso page that I could feed the URL and present the message and then redirect after a set period of time. I was wondering if there was any other way - possibly through Apache - to do this so I could just put external links and not have to worry about the Lasso page.
>

How would YOUR Apache receive the request since as soon as the user clicks the external link off they go to that external site. You never get to see the click.

> There is the benefit of being able to display the offsite message on URLs that I want to display it for if I use a Lasso page. For instance, I would want the message to display if it was going to any server or site that I did not directly control. But there may be a case where I want to send the user to one of my other servers and not have the message displayed.
>
> Anyone doing anything like this?
>


I'm doing something that could be reappropriated to what you want. I'm marking external links with an icon so that people have a visual cue that this link is going to take them somewhere else.

To do this I've trained all the people who edit content on this site to always use relative URLs and only to use http:// or https:// on URLs for other sites.

Then with jQuery on each page I have:

$("a[href^='http']").not("[href*='mysite.com']").addClass("extlink");

Rather than adding a class you could change that to a click function that opens your message - as an alert message using jQueryUI or similar, or by rewriting the URL to bounce by a lasso page that shows your message, etc.

- Wade


#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to <[hidden email]>
#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>