Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 30th, 2004, 08:44 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default Window.History

Hi, is there a possibility to clean up the url listed in window.history using javascript. I use the IE browser in my development environment.

TIA
Praveen

  #2 (permalink)  
Old August 30th, 2004, 03:04 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

What do you mean by "clean up"? There is no way to access the contents of the history object, unless you want to go() to them or go back() or forward() or reload().

Snib

<><
  #3 (permalink)  
Old August 31st, 2004, 12:20 AM
Authorized User
 
Join Date: Nov 2003
Location: , , .
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What I meant by cleanup is that, as and when I navigate to other pages from the currently opened window, I don't want the references in the History object to be present.

In other words, the back button on the browser should not have any URLs listed.

What I was pondering upon was not to disable the Back button on the browser toolbar, instead just clear up the url's listed in the history object.

I've understood from your comments, that using History object I can navigate forward/ backwards, but can't access the contents in it.

Is there any other workaround.

TIA
Praveen

  #4 (permalink)  
Old August 31st, 2004, 04:04 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You would have to use the location.replace(Url) for all navigation throughout the site.



--

Joe (Co-author Beginning XML, 3rd edition)
  #5 (permalink)  
Old September 3rd, 2004, 09:36 PM
Authorized User
 
Join Date: Aug 2004
Location: Yogyakarta, D.I. Yogyakarta, Indonesia.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

With location.replace() you will get a new opened browser that is out of the member of the previous stack/history. You need to know that every browser uses stack method to set histories on the browser. Remember not to use location.href() !!

With love, Randhy.

  #6 (permalink)  
Old September 4th, 2004, 03:49 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Quote:
quote:Originally posted by Randhy
 With location.replace() you will get a new opened browser...


No, you will replace the current page without adding to the history.

--

Joe

--

Joe (Co-author Beginning XML, 3rd edition)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser history abdul_owiusa Javascript How-To 11 October 13th, 2006 09:13 AM
How to clear history toshi Javascript 0 August 17th, 2006 06:07 AM
history.back(-1); elania Javascript How-To 3 February 2nd, 2005 03:14 PM
History data stagedancer SQL Server 2000 2 December 8th, 2004 09:57 AM
Record History cdenequolo Classic ASP Basics 2 December 3rd, 2003 12:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.