Quantcast
Channel: Pale Moon forum
Viewing all articles
Browse latest Browse all 2334

Browser Development • Re: Manual modification of URL hash in address/location bar

$
0
0
There may be multiple issues here, but the first issue seems to be that manually altering the anchor of a URL in the location bar, and then trying to get the browser to honor that new anchor by pressing Enter or clicking the green "Go to the address..." arrow does not cause the browser to reinterpret the anchor, nor revisit the URL with that anchor in mind.

Oddly enough, doing the same thing with a URL that does not contain an anchor (like http://www.palemoon.org/ ) does revisit the URL (very similar to an F5 refresh). I think some discussion is warranted about how the browser should behave when an anchor exists in the URL and the user asks to visit the same URL again either with the same anchor or a different one.

I'd think that if the anchor is changed and the URL is requested, at the very least the browser should attempt to reach that anchor point in the HTML document (without hitting the network connection). But even that doesn't happen, which is a little odd. Can't say I've ever run into this situation in the wild, but there it is.


Edit: Well testing on my own web forum software I was able to reproduce the issue, but wasn't able to on this forum's setup.

CODE:

// For example, first visit:https://forum.palemoon.org/viewtopic.php?f=66&t=30275&start=40#p243198// Then manually alter the URL to this and try to get it to apply:https://forum.palemoon.org/viewtopic.php?f=66&t=30275&start=40#p243245
That actually works well, and as expected. Let me get an example that doesn't work, hang tight.

Edit 2: Never mind, it is behaving well on the other forum software now. I'll try to get an example that shows the poor behavior. We'll see.

Edit 3: Yah it must have been a total fluke when I checked before, or I was doing it wrong. This just seems to work. Here's an even better example to toggle between and see it working:

CODE:

https://forum.palemoon.org/#tophttps://forum.palemoon.org/#start_here
I think the trouble comes in when the requested anchor ID does not exist on the page! That's when things stop working as expected. I think that's the thread to pull on now. For example, try:

CODE:

https://forum.palemoon.org/#start_herehttps://forum.palemoon.org/#this_anchor_does_not_exist


Viewing all articles
Browse latest Browse all 2334

Trending Articles