Categories Menu
Repair Center
24 hours online support we repair all types of laptops and relating to LCD screen,motherboard, DC adapter, power supplies and so much more! The shop reliable laptop repair in Ottawa area since 1995. Repair your laptop as easy as 1-2-3 !
computer_25
Services for your location
How to disable Back button in Internet browser
print
report error
add to favorites
write a review
send to friends
suggest a topic
register

Ever been to one of those sites where you try to click the Back button, but nothing happens? Instead of going back to the previous page you were on, it just keeps reloading the same page??

Yeah that’s pretty annoying, but lots of websites do it! In this post, I’ll teach you how you can also do it, though I only recommend it in specific instances. Do not put this code on your entire website, otherwise it will ruin the user experience.

If there is a page that you need to ensure people cannot click Back to get to, such as when completing a checkout process or something, then use this technique. Also, note that it may not work in all browsers or browsers in which Javascript is disabled.

Unfortunately, there is not one piece of code that always works. Basically, there is a function called forward in JavaScript that lets you automatically send someone back to the page they just came from.

So on the page that you do not want people to be able to come back to, try this code:

    <body onLoad=”history.go(+1)”>

Or you can try this JavaScript code:

    onLoad=”if(history.length>0)history.go(+1)”

If you’re not having much luck with that, try this out:

    <script language=”javascript”>
    window.history.forward(1);
    </script>

Or even more simply, you can try this:

    <script>
    history.forward();
    </script>

prev
1
Other newly Articles from the Multimedia, Network ,Wi-Fi and Web - Web Guide / Internet Category:
  1. Run multiple sites from the same code base (multi-site)
  2. How to repair hijacked and juggled IE homepage?
  3. MSN error codes(1)
  4. Unscramble Facebook—from design principle to architecture system
  5. Trick To Increase Browsing Speed for IE and Firefox
  6. How to disable Back button in Internet browser
  7. Internet Explorer Freezes Up
  8. How to Avoid False or Misleading Internet Advertising
  9. How to Create Multiple User profiles in FireFox on Mac OSX
  10. How to Limit internet access to users?
  11. How to Change the Font size of Web page?
  12. Add and remove Internet Explorer 8 add-ons
  13. 8 tips for handling email effectively
  14. How to Fix Broken and Slow Tab Issues in Internet Explorer 8
  15. How to Speed Up a Slow Internet Connection
Custom Search
Examples: HP,laptop Rapair,LCD,DC Backlight,Inverter,solder
Article Comment:Replies(0)Views
Name(required):        Email(required):  
Verify: key
Use the above information at your own risk
Loading ... Loading ...