Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. disabling BACK & FORWARD buttons of the browsers.

disabling BACK & FORWARD buttons of the browsers.

Scheduled Pinned Locked Moved ASP.NET
javascripttutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 2 Offline
    2 Offline
    2489128
    wrote on last edited by
    #1

    How to disabled BACK & FORWARD buttons of the browsers using javascript?

    P 1 Reply Last reply
    0
    • 2 2489128

      How to disabled BACK & FORWARD buttons of the browsers using javascript?

      P Offline
      P Offline
      Perspx
      wrote on last edited by
      #2

      That is an example of one of the most important _don't_s of using JavaScript.

      1. It isn't possible using JavaScript, as well as the fact that all browsers will handle back and forward buttons/actions in different manners.
      2. Remember that the user always has control over what they're doing - no matter what your page is doing, browsers have been set up and created so that the user has the control over what they're doing and web pages cannot compromise this.
      3. (Even if possible) removing such a core feature of the web browser would simply irritate your users and make them go elsewhere.

      Regards, --Perspx

      "I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
      "Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

      P 1 Reply Last reply
      0
      • P Perspx

        That is an example of one of the most important _don't_s of using JavaScript.

        1. It isn't possible using JavaScript, as well as the fact that all browsers will handle back and forward buttons/actions in different manners.
        2. Remember that the user always has control over what they're doing - no matter what your page is doing, browsers have been set up and created so that the user has the control over what they're doing and web pages cannot compromise this.
        3. (Even if possible) removing such a core feature of the web browser would simply irritate your users and make them go elsewhere.

        Regards, --Perspx

        "I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
        "Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

        P Offline
        P Offline
        puviyarasan j
        wrote on last edited by
        #3

        This is not Possible in Web Pages. But programatically you can do. In java script: BACK KEY: 1. check history.forward contains any data then call in history.back(). FORWARD KEY: 1. check history.back contains any data then call in history.forward().

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups