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. General Programming
  3. C#
  4. Clear a WebBrowser's History????

Clear a WebBrowser's History????

Scheduled Pinned Locked Moved C#
question
6 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.
  • F Offline
    F Offline
    FoxholeWilly
    wrote on last edited by
    #1

    Is there a way to clear the history of a webbrowser? I have a winform that uses a webbrowser, but when I go from one process to another I'd like its history to be cleared so that the back button goes no further than the current process's first page.

    L K 2 Replies Last reply
    0
    • F FoxholeWilly

      Is there a way to clear the history of a webbrowser? I have a winform that uses a webbrowser, but when I go from one process to another I'd like its history to be cleared so that the back button goes no further than the current process's first page.

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      FoxholeWilly wrote:

      back button goes no further than the current process's first page

      The back button history is persistent across processes? Can someone confirm this? It sure doesn't work that way in IE or Firefox browser desktop instances.


      "What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum led mike

      F 1 Reply Last reply
      0
      • F FoxholeWilly

        Is there a way to clear the history of a webbrowser? I have a winform that uses a webbrowser, but when I go from one process to another I'd like its history to be cleared so that the back button goes no further than the current process's first page.

        K Offline
        K Offline
        kalyanhere
        wrote on last edited by
        #3

        in your html page put the following history.forward this vil work good regards kalyan

        1 Reply Last reply
        0
        • L led mike

          FoxholeWilly wrote:

          back button goes no further than the current process's first page

          The back button history is persistent across processes? Can someone confirm this? It sure doesn't work that way in IE or Firefox browser desktop instances.


          "What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum led mike

          F Offline
          F Offline
          FoxholeWilly
          wrote on last edited by
          #4

          You assume too much with the word "process." I am using it in its generic form. I have a webbrowser, a user pushes a button, and it displays some content, then does something completely different, then pushes a button, and other content is displayed in the webbrowser. I would like to clear the navigation history so that when the user pushes "back" he does not go beyond the initial page from the second time the webbrowser was used.

          L 1 Reply Last reply
          0
          • F FoxholeWilly

            You assume too much with the word "process." I am using it in its generic form. I have a webbrowser, a user pushes a button, and it displays some content, then does something completely different, then pushes a button, and other content is displayed in the webbrowser. I would like to clear the navigation history so that when the user pushes "back" he does not go beyond the initial page from the second time the webbrowser was used.

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            FoxholeWilly wrote:

            You assume too much with the word "process."

            Yeah sorry about that. :-O I got your original reply by email. I can understand how you thought that. I have used WebBrowser in applications where I create new instances of it during the lifetime of the application (process). I thought you were meaning that and the history was still present across the different instances. I was interested since it would effect the behavior of my applications.


            "What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum led mike

            F 1 Reply Last reply
            0
            • L led mike

              FoxholeWilly wrote:

              You assume too much with the word "process."

              Yeah sorry about that. :-O I got your original reply by email. I can understand how you thought that. I have used WebBrowser in applications where I create new instances of it during the lifetime of the application (process). I thought you were meaning that and the history was still present across the different instances. I was interested since it would effect the behavior of my applications.


              "What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum led mike

              F Offline
              F Offline
              FoxholeWilly
              wrote on last edited by
              #6

              Sorry about the original reply, it was one of those stupid and impulsive messages that one regrets the moment the "Post" key is pushed. I figured I would have to just dispose and recreate the webbrowser control each time, but was hoping there was a simple yet illusive command that would clear the history, something like WebBrowser.ClearHistory() (hint, hint, Microsoft)

              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