-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deter use of this kind of anchors instead of id-based anchors #11
Comments
You can't select these anyways unless you do a seriously complicated, slightly arcane CSS selector (which is itself a bit inaccessible to code monkeys), and with my proposal, it takes away even that. And for text search, it's not that substantially slower, not enough that abuse like this really generates a substantial performance problem outside larger pages that are already relatively slow to load in the first place. Edit: Forgot to finish and link my proposal before commenting. |
I'm not sure I understand the issue here. Is the proposal to disallow scroll-to-text fragments on a navigation within the same document (e.g. window.hash = '...'), the existing proposal already does so in the Security section, the Limit feature to full (non-same-page) navigations bit of the Security section |
I'm also curious what the performance and resource consumption problems would be. Doing a text search over a file does a little more work but is trivial in comparison to loading and processing the full resource so I don't think that's a concern. |
Indeed; thanks.
The problem is that locating content by
in order to scroll browser has to parse the source and determine bounding boxes of pieces of content anyway, doesn't it? |
Try searching for
So it needs a quick CSS pass, but it does not need to calculate layout. In fact, it only needs to calculate two CSS properties, neither of which are inherited. Also, it's worth noting in this case, your cursor will turn into a text select cursor over the |
The browser only has to walk the laid-out DOM tree. Depending on the implementation, it may have to do that anyway for an id match. I just mean that by the time the page has been downloaded, parsed, run style, layout, paint, etc. the cost of doing a text search is negligible in comparison. The amount of work the browser is doing to load any given page is quite staggering. |
It is proposed to make this kind of links unworkable for the content within the same page.
Rationale: code-monkeys would abuse it for referencing content in own applications instead of
id
s. It can cause performance, efficiency and resource consumption problems. But code-monkeys don't care. Unfortunately sometimes even large web resources hire code-monkeys. So the standard should be foolproof.The text was updated successfully, but these errors were encountered: