• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Back Button Issue

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
If i click the back button it is showing the previous page even after logging out from that page. Please help me to solve this issue.......
Thanks in advance..
 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most common problem is that we write what we see in front of us but the fact is that it is known/clear only to us and not to everyone.So you have to always brief it to an extent.What you wrote is what was happening before you and not what is happening within!

 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The back button will always show the previous page. If the user tries to do an action on that page, your backend should not let it happen.

Only way to get an expired page is to use no caching headers and posts, but that kills your user's experience.

Eric
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When user clicks on the back button, you can make it appear to remain on the current page using a simple javascript like


The same can be accomplished by location.replace(url) in javascript.
You may also google to see if you want to disable the browser back button altogether.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

window.history.forward(1);


Don't do that, nor try to attempt disabling the back button: InterfaceDesignersRule1
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hetal Vora wrote:You may also google to see if you want to disable the browser back button altogether.


Worst. Advice. Ever.
 
kokila devi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

Thank you sir, I've tried it and also it works. But this javascript is working out well only in internet explorer and not in mozilla firefox, while trying in mozilla it is going back once and then closing the session. Please help me to solve this browser issue.....

Thanks in advance.
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic