Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulate Browser History

Status
Not open for further replies.

JCScoobyRS

IS-IT--Management
Nov 20, 2002
15
US
Is there a way to manipulate the browser history? I have a web app where the urls aren't visible but when I open IE, I see those urls in the browser history and I either need to make it so that the urls aren't added there in the first place or figure out a way to get rid of them. Anyone got any ideas? Thanks, Jeremy

 
once a page is navigated it is in the history which is read only (you cannot overwrite it) with the exception of the page that you are currently on - you can use location.replace() which keeps a new history item from being created...

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
I knew both of those and I was hoping for better information. Do you know of an ActiveX Control or something I can use to delete these manually or something? Thanks, Jeremy
 
He did BUT as with all programs, there has to be a way to do this. I can delete the History file from the drive and that's one way. I can also open the History in IE and delete select folders from today's history. I was hoping to hear of some control/hack/workaround that would enable this with script. Thanks, Jeremy
 
You might wanna post your question in another forum then.....

In javascript (what this forum relates to) it is not possible.

-kaht

banghead.gif
 
Do you want to do this just on your machine or on the machine of anybody who visits your site?

There's always a better way. The fun is trying to find it!
 
tviman, thanks for your enthusiasm. I know that JavaScript can interact/use ActiveX Object so I was hoping to go somewhere down that road. As for the machine, I need to keep certain urls from entering the client's history/auto completion drop down but only for the specified urls. Thanks, Jeremy

 
OK, Jeremy.... here's the skinny. Through the browser, and programtically, it's impossible to change the browser history. As has been posted before, the history is READ ONLY! There is no available module that will allow the browser, or any script, to alter it's contents. That doesn't mean that one can't be built. Also remember that ActiveX only works with IE browsers - no others. Additionally, on the initial page load, the user will be notified that an ActiveX module is required to be downloaded and installed in order to see the page - and they MUST authorize this, otherwise, no dice.

Now, let's assume that you can get as far as this notification... in light of the viruses being passed around in that last 60 days, it's doubtful that many users will give the OK to download anything that they know nothing about. I know I wouldn't.

Now let's touch on the ethics of changing the users browser history. Quite frankly, you don't have the right to change ANYTHING on ANYBODY's computer without their explicit authorization. PERIOD! The beauty of the internet is that people SHOULD be able to surf as they please and not worry that a malicious web site will destroy information on their machines. Once you cross that line then you have entered the ranks of those who have nothing better to do than to create and spread viruses. And let's not forget the part about ERASING the history file. Shame on you!!!! (If I ever found out that your web site erased my history file, or any other file on my machine, I'd make it my mission in life to sue your pants off!)

I can think of no valid reason to do what you want other than to hide something that you're ashamed to let others see . Again, this concept goes against the reason why the Internet is the single most widely used information medium that the world has ever seen - users expect to be able to "surf" when and where they want without the fear of harm or damage to their machines - and you, as a web page creator/owner/developer, do not have the right, under any circumstances, to do anything more than to attempt to place a cookie on the users machine.

As you can see, I'm not as enthusiatic as you wanted me to be. I won't apologize but I will say that I am sorry that someone as seemingly intelligent as you would continue to persue such an endeavor. Please let me know what your web site address is so that I can be sure to avoid it!

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top