473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Update location.hash without adding to history?

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
Nov 21 '08 #1
4 10307
On Nov 20, 9:48*pm, Mikey C <mebemik...@gmail.comwrote:
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.
>
I know it's possible to do, because Google is doing it. *See this
There is confirmation.
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.
>
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.
Nov 21 '08 #2
Mikey C wrote:
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
Nov 21 '08 #3
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:
Mikey C wrote:
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)
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...
Note, scrolling up and down changes thehashwithout 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
Nov 21 '08 #4
On Nov 21, 5:07*pm, Mikey C <mebemik...@gmail.comwrote:
Thanks so much! *Seems pretty darn simple now, but this is huge for
me.
Still a silly idea, regardless of the perceived simplicity.
Nov 22 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Yimin Rong | last post by:
Does anyone know if there are any browsers where you must specify "#" as a prefix when setting the hash for the location? For example, the following would move to the intro section of the...
1
by: solutions | last post by:
Hi, Here is my relevant code for an arbitrary page (let's call it PAGE_B): <body onload="window.location.hash='anchor';"> With this code, if the user goes from PAGE_A to PAGE_B, he will jump...
18
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
7
by: User | last post by:
Hi, A page I have shows a different background colour depending on the hash portion of the url as it is first loaded. For example a link to mysite/mypage#0000FF would result in a page with a blue...
3
by: Stewart | last post by:
Dear javascripters, Through a frustrating afternoon of debugging I appear to have discovered something: Setting location.hash to an empty string in the global namespace (not inside a...
2
by: Dennis Ålund | last post by:
Is it possible to notice a change of window.location.hash without polling? I'm working on a Ajax-platform (yes, inventing the wheel again) and have finished almost everything except the support...
2
by: danep | last post by:
Basically, my problem is exactly as described in the subject. The problem is somewhat intermittent and unpredictable, but the majority of the time if I just have a statement such as ...
1
rohypnol
by: rohypnol | last post by:
Hello, I have a problem with IE and location.hash. If I change the hash, the history doesn't "update" and it only keeps one record of the URL. This whole website is AJAX-driven and I need the user...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.