Exit Redirect

 

Results 1 to 14 of 14
Can anybody tell me if there is a wp plugin or methos whereby on leaving ...
  1. #1
    trevormorley is offline Junior Member
    Join Date
    Feb 2010
    Posts
    134
    Thanks
    41
    Thanked 29 Times in 25 Posts

    Default Exit Redirect

    Can anybody tell me if there is a wp plugin or methos whereby on leaving my page that the user is redirected to another one - I currently use exitwindow but it is easy for the user to click on the pop up and cancel the redirect, I don't want them to have the choice, I just want it to take them there...




  2. #2
    dnreg is offline Jr. VIP
    Join Date
    Sep 2009
    Posts
    147
    Thanks
    89
    Thanked 119 Times in 46 Posts

    Default Re: Exit Redirect

    I don't know of a plugin, but it's a very simple javascript that does this. Look up onexit javascript redirect in Google.

  3. The Following User Says Thank You to dnreg For This Useful Post:

    trevormorley (07-29-2010)

  4. #3
    Dark Knight's Avatar
    Dark Knight is offline ║█║▌║█║▌│║▌║▌█║
    Join Date
    Nov 2009
    Posts
    697
    Thanks
    246
    Thanked 1,168 Times in 206 Posts

    Default Re: Exit Redirect

    I am looking for the samething for wordpress but couldn't find it anywhare??

  5. #4
    LinkBlog's Avatar
    LinkBlog is offline Newbies
    Join Date
    Jun 2010
    Posts
    18
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default Re: Exit Redirect

    Try using Exit Rescue Plugin

  6. #5
    Dark Knight's Avatar
    Dark Knight is offline ║█║▌║█║▌│║▌║▌█║
    Join Date
    Nov 2009
    Posts
    697
    Thanks
    246
    Thanked 1,168 Times in 206 Posts

    Default Re: Exit Redirect

    Quote Originally Posted by LinkBlog View Post
    Try using Exit Rescue Plugin
    it is giving a option to visitor, I don't wanna give them option though

  7. #6
    akleinesw is offline Newbies
    Join Date
    Feb 2011
    Location
    Spain
    Posts
    1
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Exit Redirect

    It seems like there is no way to avoid the option. I have found the following comment

    "You actually can't, directly. The browser takes charge of showing the confirmation, and either continuing the navigation if OK, or doing nothing if Cancel. You don't get to find out whether the user clicked OK until you get the final unload, by which point it's too late."

    A simple code (including the option) that worked for me is:
    <script type="text/javascript">
    window.onbeforeunload = function (evt) {
    var message = 'Are you sure you want to leave?';
    if (typeof evt == 'undefined') {
    evt = window.event;
    }
    if (evt) {
    evt.returnValue = message;
    window.location = "yourURLhere";
    }
    return message;
    }
    </script>

  8. The Following User Says Thank You to akleinesw For This Useful Post:

    TheArticleMen (11-30-2012)

  9. #7
    adminx's Avatar
    adminx is offline Registered Member
    Join Date
    Apr 2008
    Posts
    61
    Thanks
    89
    Thanked 14 Times in 10 Posts

    Default Re: Exit Redirect

    I know this is an old thread but I just found it and tried
    I pasted the script into the header and it works but I still get the
    window "This page is asking if you want to leave"

    is there a way to force the redirect without getting the window?

    thx

  10. #8
    captchadreams's Avatar
    captchadreams is offline Regular Member
    Join Date
    Sep 2008
    Posts
    492
    Thanks
    320
    Thanked 123 Times in 92 Posts

    Default Re: Exit Redirect

    Quote Originally Posted by adminx View Post
    I know this is an old thread but I just found it and tried
    I pasted the script into the header and it works but I still get the
    window "This page is asking if you want to leave"

    is there a way to force the redirect without getting the window?

    thx
    I think it's a security feature in the browsers.. it's not the actual code or plugin popping this up.. but when the code does try to redirect them.. the browser pops up that menu as a security feature.. otherwise you could just keep redirecting them until they closed out the browser.. which is malicious

  11. #9
    Join Date
    Mar 2010
    Location
    USA
    Posts
    972
    Thanks
    1,131
    Thanked 434 Times in 278 Posts

    Default Re: Exit Redirect

    A member here produced a plug in called Bounce Rate. Search the forum for the thread. I haven't tried it yet so YMMV.

  12. #10
    hunar's Avatar
    hunar is offline Regular Member
    Join Date
    Jan 2009
    Location
    Minnesota
    Posts
    478
    Thanks
    207
    Thanked 171 Times in 102 Posts

    Default Re: Exit Redirect

    There is one called exit rescue. It does give the option for user to stay or leave but it will automatically try to load whatever site you want in the background. Not sure if that's what your looking for?

  13. #11
    hungbli is offline Registered Member
    Join Date
    Jul 2008
    Age
    26
    Posts
    63
    Thanks
    35
    Thanked 5 Times in 4 Posts

    Default Re: Exit Redirect

    Quote Originally Posted by akleinesw View Post
    It seems like there is no way to avoid the option. I have found the following comment

    "You actually can't, directly. The browser takes charge of showing the confirmation, and either continuing the navigation if OK, or doing nothing if Cancel. You don't get to find out whether the user clicked OK until you get the final unload, by which point it's too late."

    A simple code (including the option) that worked for me is:
    <script type="text/javascript">
    window.onbeforeunload = function (evt) {
    var message = 'Are you sure you want to leave?';
    if (typeof evt == 'undefined') {
    evt = window.event;
    }
    if (evt) {
    evt.returnValue = message;
    window.location = "yourURLhere";
    }
    return message;
    }
    </script>
    HI,
    It show the message but not redirect to the website, what's wrong with wordpress 3.9.1?

  14. #12
    IMCapitalist is offline Power Member
    Join Date
    Jan 2014
    Posts
    498
    Thanks
    1
    Thanked 36 Times in 36 Posts

    Default Re: Exit Redirect

    try "Exit Redirect" wp plugins

  15. #13
    bobmarleyfans is offline Newbies
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Exit Redirect

    Thanks akleinesw for this. but my problem is,the current settings shows the message ,when i try to view the internal pages or external pages.
    My requirement is simple,the page will shows/redirect only if the visitor try to close the window ,but if they visit other external or internal pages of web site means it shouldn't show the message or redirects.

    Thanks in advance
    Last edited by bobmarleyfans; 06-24-2014 at 01:10 AM. Reason: content added

  16. #14
    wickid is offline Back Button Hijacker
    Join Date
    May 2008
    Posts
    136
    Thanks
    56
    Thanked 38 Times in 28 Posts

    Default Re: Exit Redirect

    I have the perfect solution for you. Check out BackJacker and stop giving users the option to leave or stay and send them wherever you want when they click the back button.


Similar Threads

  1. Need an Exit Redirect script
    By jdownloads in forum General Scripting Chat
    Replies: 5
    Last Post: 07-14-2013, 05:31 AM
  2. Blogger.com on exit redirect ?
    By extatic86 in forum HTML & JavaScript
    Replies: 0
    Last Post: 02-13-2009, 01:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




BlackHatWorld on Twitter BlackHatWorld on FaceBook


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109