Connecting Tech Pros Worldwide Help | Site Map

Update location.hash without adding to history?

  #1  
Old November 21st, 2008, 02:55 AM
Mikey C
Guest
 
Posts: n/a
Hi Everyone,

I understand in many cases, adding to history when updating
window.location.hash is a GOOD thing. In my case, I want to update
bookmarkability from javascript (post-load), but can't get it to do so
without adding a record to history. (Firefox 3.0.3)

I know it's possible to do, because Google is doing it. See this
URL:
http://books.google.com/books?hl=en&...e7_NU#PPA21,M1

Note, scrolling up and down changes the hash without adding history
entries.

Any idea how this is done? I have been looking for a solution for
months (on and off, but haven't found anything.)

Thanks,
-MIke C
  #2  
Old November 21st, 2008, 03:05 AM
David Mark
Guest
 
Posts: n/a

re: Update location.hash without adding to history?


On Nov 20, 9:48*pm, Mikey C <mebemik...@gmail.comwrote:
Quote:
Hi Everyone,
>
I understand in many cases, adding to history when updating
window.location.hash is a GOOD thing. *In my case, I want to update
bookmarkability from javascript (post-load), but can't get it to do so
without adding a record to history. *(Firefox 3.0.3)
That would be a silly thing to do.
Quote:
>
I know it's possible to do, because Google is doing it. *See this
There is confirmation.
Quote:
URL:http://books.google.com/books?hl=en&...&oi=fnd&pg=PP1...
>
Note, scrolling up and down changes the hash without adding history
entries.
That is not what the hash is for and there is little chance that
Google is doing anything right in their script.
Quote:
>
Any idea how this is done? *I have been looking for a solution for
months (on and off, but haven't found anything.)
>
You wasted those months. Now re-think your design.
  #3  
Old November 21st, 2008, 08:05 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a

re: Update location.hash without adding to history?


Mikey C wrote:
Quote:
I understand in many cases, adding to history when updating
window.location.hash is a GOOD thing. In my case, I want to update
bookmarkability from javascript (post-load), but can't get it to do so
without adding a record to history. (Firefox 3.0.3)
>
I know it's possible to do, because Google is doing it. See this
URL:
http://books.google.com/books?hl=en&...e7_NU#PPA21,M1
>
Note, scrolling up and down changes the hash without adding history
entries.
>
Any idea how this is done? I have been looking for a solution for
months (on and off, but haven't found anything.)
Well, the *location* is being *replace*d ...


HTH

PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
  #4  
Old November 21st, 2008, 10:15 PM
Mikey C
Guest
 
Posts: n/a

re: Update location.hash without adding to history?


Thanks so much! Seems pretty darn simple now, but this is huge for
me.

I had been setting window.location.hash = "value".
window.location.replace("value") works!

Thanks again!,
-Mike C


On Nov 21, 2:58*pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Quote:
Mikey C wrote:
Quote:
I understand in many cases, adding to history when updating
window.location.hashis a GOOD thing. *In my case, I want toupdate
bookmarkability from javascript (post-load), but can't get it to do so
without adding a record to history. *(Firefox 3.0.3)
>
Quote:
I know it's possible to do, because Google is doing it. *See this
URL:
http://books.google.com/books?hl=en&...&oi=fnd&pg=PP1...
>
Quote:
Note, scrolling up and down changes thehashwithout adding history
entries.
>
Quote:
Any idea how this is done? *I have been looking for a solution for
months (on and off, but haven't found anything.)
>
Well, the *location* is being *replace*d ...
>
HTH
>
PointedEars
--
* * realism: * *HTML 4.01 Strict
* * evangelism: XHTML 1.0 Strict
* * madness: * *XHTML 1.1 as application/xhtml+xml
* * * * * * * * * * * * * * * * * * * * * * * * * * -- Bjoern Hoehrmann
  #5  
Old November 22nd, 2008, 01:05 AM
David Mark
Guest
 
Posts: n/a

re: Update location.hash without adding to history?


On Nov 21, 5:07*pm, Mikey C <mebemik...@gmail.comwrote:
Quote:
Thanks so much! *Seems pretty darn simple now, but this is huge for
me.
Still a silly idea, regardless of the perceived simplicity.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with back button and AJAX marfola answers 8 January 29th, 2008 08:26 AM