Questions tagged [back-button]

A button that will take the user back to the previous state that they were on.

A back button, often depicted with leftward facing arrow icon, is a basic control that allows the user to return to a previous application state.

In web browsers, a historical record of each time a user navigates to a new page is kept. Clicking the browser's back button will return the user to the previous page in the history.


For example, if a user navigates first to google.com (1) then to facebook.com (2) then to youtube.com (3), their browsing history will include all the pages they visited at each site in the order they were viewed (1, 2, 3).

While on youtube.com (3), if the user clicks the back button, they will then be taken to facebook.com (2). If they click the back button again, they will be taken to google.com (1).

1630 questions
27
votes
5 answers

Change font of back button on UINavigationController

I'm trying to change the font color of the text on my back button in my UINavigationControllerBar: [[UIBarButtonItem appearance] setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; I get this error: [_UIBarItemAppearance…
26
votes
5 answers

Check if back key was pressed in android?

Say I'm on my main activity and I start a new activity MainActivity > NewActivity And from NewActivity I press the back key MainActivity < NewActivity I want MainActivity to do something if it's being displayed after NewActivity is closed, but not…
William L.
  • 3,846
  • 9
  • 53
  • 72
24
votes
8 answers

PHP Document Expired

I doing some PHP coding, if the 'Back' button is pressed on the browser, I get the following error: Document Expired This document is no longer available. What code can I implement to cater to this situation
user1383147
  • 1,033
  • 4
  • 11
  • 12
23
votes
16 answers

Is there a way to keep a page from rendering once a person has logged out but hit the "back" button?

I have some website which requires a logon and shows sensitive information. The person goes to the page, is prompted to log in, then gets to see the information. The person logs out of the site, and is redirected back to the login page. The person…
Tom Kidd
  • 12,830
  • 19
  • 89
  • 128
23
votes
6 answers

Take User Back to Where They Scrolled to on previous page when clicking Browser Back Button

Is it possible to take a user back to the area of a page where they scrolled down to when pressing the back button in a browser? As in --- pageA is double your screen size (hence you have to scroll to read more). You click a link on pageA to go to…
RooksStrife
  • 1,647
  • 3
  • 22
  • 54
23
votes
5 answers

How to detect if the user clicked the "back" button

When the user goes history-back-1...how do I detect that? And then, alert "the user clicked back!" Using binds (and jQuery preferably)
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
23
votes
3 answers

How to prevent calling onCreateView when back button pressed in fragment in android

In my application, I have tabbar functionality. In one tab i am displaying server data in lisview, and on clicking on that detail page for that list item will be open in new fragment. But when I press back button from that detail page, every time…
Mihir Shah
  • 1,799
  • 3
  • 29
  • 49
22
votes
2 answers

Is it possible to e.preventDefault in window.onPopState?

I'm trying to stop the user from going back in my web app. For this I tried catching the window.onpopstate and added e.preventDefault to cancel the back button effect. But it doesn't seems to happen. window.addEventListener('popstate',function(e){…
Ivin
  • 4,435
  • 8
  • 46
  • 65
19
votes
3 answers

Override Android Backbutton behavior only works on the first page with PhoneGap

I am using PhoneGap 1.5.0, jQuery 1.7.1 and jQuery mobile 1.0.1 and trying to override the backbutton in Android as stated here or here. document.addEventListener("deviceready", onDeviceReady, false); // PhoneGap loaded function onDeviceReady()…
Redfox
  • 1,024
  • 1
  • 11
  • 28
19
votes
10 answers

How to change uinavigationbar back button text

I am currently trying to change the back button text of a subview that is loaded of a tablecell touch. However even with the way I am trying to implement it it still shows the parents title in the back button. I am trying to load a new value into…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
19
votes
9 answers

How to show a dialog box after pressing the back button

By clicking the back button, I want to display a dialog box consisting of TextViews and a button called exit. After clicking the exit button it should come out from my app I did like this, @Override public void onBackPressed() { …
Jyosna
  • 4,436
  • 13
  • 60
  • 93
19
votes
2 answers

What happens when you go back with the browser?

When I press <== back button in the browser, what is going on? Is the query with the same URL made again? Is the current DOM state saved and restored? (HTML only) Is the current page state saved and restored? (HTML + Javascript) Is the server…
Augustin Riedinger
  • 20,909
  • 29
  • 133
  • 206
19
votes
2 answers

Back button closing app even when using FragmentTransaction.addToBackStack()

None of the other questions I have read on stackoverflow have been able to help with my problem. As far as I can tell, I am doing everything correctly. I have a master/detail flow with fragments. Upon creation of the main activity, the master…
scottysseus
  • 1,922
  • 3
  • 25
  • 50
19
votes
8 answers

how to close android app completely

I created an android application with a logout option in onCreateOptionsMenu. The Logout works perfectly but when I press the back button again it takes me to the previous activity, and when it gets a null value it redirects to login screen. Now my…
Brett
  • 431
  • 2
  • 10
  • 26
19
votes
6 answers

How to localize Back Buttons?

I am translating an app into Indonesian. The storyboard uses a navigation controller and push segues for all of its view. When I go to a view from the main menu the back button is translated correctly, but when i go to a view from there (two views…
67cherries
  • 6,931
  • 7
  • 35
  • 51