Update location.hash without adding to history? 
November 21st, 2008, 02:55 AM
| | |
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 | 
November 21st, 2008, 03:05 AM
| | | | 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. 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. | 
November 21st, 2008, 08:05 PM
| | | | 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 | 
November 21st, 2008, 10:15 PM
| | | | 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:
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
| | 
November 22nd, 2008, 01:05 AM
| | | | 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. |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|