3 ms·
This drives me nuts. I see two modes of breakage: 1. When a search engine indexes something dynamic that has changed by the time I visit the page, and 2. When
by happyslobro 10y ago
This drives me nuts. I see two modes of breakage:
1. When a search engine indexes something dynamic that has changed by the time I visit the page, and
2. When some part of the UI is in the DOM, but not visible.
#1 could probably be solved by judicious use of <aside> on the part of developers, and by SEO penalties imposed on sites that update indexed content without inviting a crawler over to see it within a timely manner.
As for #2, I avoid this problem in React by imposing a rule in the coding standards: Do not hide elements. Omit them from a render function when you don't need them. This idea of keeping a stash of recyclable elements complicates that a little.
What browser vendors could do to help, is identify non-visible elements and omit them from the Ctrl-F search index. They are probably already identifying invisible elements in order to prune them from the renderer's view of the DOM tree. I wonder how hard it is to submit a pull request to Chromium?