Forum: Ruby on Rails Disable back button of browser

Posted by Maddy (Guest)
on 2012-12-21 07:33
(Received via mailing list)
Hi Folks,

Good Day,

*How to disable back button of browser??*

Please advise!

Thank You.
Posted by Jim ruther Nill (jimboker)
on 2012-12-21 07:35
(Received via mailing list)
On Fri, Dec 21, 2012 at 2:32 PM, Maddy <ashokkumar@shriramits.com> 
wrote:

> Hi Folks,
>
> Good Day,
>
> *How to disable back button of browser??*
>

you cant.


> rubyonrails-talk+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-....
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



--
Posted by Jordon Bedwell (Guest)
on 2012-12-21 07:36
(Received via mailing list)
On Fri, Dec 21, 2012 at 12:32 AM, Maddy <ashokkumar@shriramits.com> 
wrote:
> How to disable back button of browser??

You can't.  It's the users browser, not yours.
Posted by Ashokkumar Yuvarajan (Guest)
on 2012-12-21 08:12
(Received via mailing list)
Thanks!

Is there any another way??

My requirement is, once i clicks the browser back button my site 
*redirect
to home page*.

Please advice!



On Fri, Dec 21, 2012 at 12:05 PM, Jordon Bedwell 
<envygeeks@gmail.com>wrote:

> rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


--

*"Attitude is a little thing that makes a big difference"*


Thanks & Regards
*Ashokkumar.Y*
*ROR-Developer
**email : ashokkumar@shriramits.com*
*Shriramits*


*
*
Posted by Jordon Bedwell (Guest)
on 2012-12-21 08:26
(Received via mailing list)
On Fri, Dec 21, 2012 at 1:10 AM, Ashokkumar Yuvarajan
<ashokkumar@shriramits.com> wrote:
> Is there any another way??
>
> My requirement is, once i clicks the browser back button my site redirect to
> home page.

The saying "it's more trouble than it's worth" is particularly fitting
in this situation.
Posted by Jim ruther Nill (jimboker)
on 2012-12-21 08:34
(Received via mailing list)
On Fri, Dec 21, 2012 at 3:10 PM, Ashokkumar Yuvarajan <
ashokkumar@shriramits.com> wrote:

> Thanks!
>
> Is there any another way??
>

Nope.


>
> My requirement is, once i clicks the browser back button my site *redirect
> to home page*.
>
> Please advice!
>

If there is a way, this is not the forum to ask :)


>>
>
> *Shriramits*
> rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



--
Posted by Rafi A (Guest)
on 2012-12-21 11:35
(Received via mailing list)
Ashok,

You can disable the browser back button with the help
of JavaScript snippets:
Posted by Tim Slattery (Guest)
on 2012-12-21 15:05
(Received via mailing list)
Rafi A <rafiglitz@gmail.com> wrote:

>Ashok,
>
>You can disable the browser back button with the help
>of JavaScript snippets:

I don't think so. This is in the FAQ in comp.lang.javascript, and the
answer is that it can't be done.

--
Tim Slattery
Slattery_T@bls.gov
Posted by Scott Ribe (Guest)
on 2012-12-21 15:43
(Received via mailing list)
On Dec 20, 2012, at 11:32 PM, Maddy wrote:

> How to disable back button of browser??

NO NO NO! 100 TIMES NO!

The back button is so fundamental to the experience of using a browser, 
that if your design needs it to be disabled, then your design is broken. 
Period. End of discussion.


--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
Posted by Matt Jones (Guest)
on 2012-12-21 20:10
(Received via mailing list)
On Friday, 21 December 2012 02:10:51 UTC-5, Maddy wrote:
>
As others have indicated, it's tricky-to-impossible and considered
*seriously* bad practice to do this sort of fiddling with the browser's
navigation.

A better question is, why does this need to happen? There's a good 
chance
that the need for this sort of behavior reflects a design smell 
someplace
else - for instance, trying to maintain session state in the URL or 
similar.

--Matt Jones
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.