Live data from Hacker News

Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

news.ycombinator.com

61–70 of 97 posts

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#61

I see lots of replies suggesting scrolling for a long time and then using CTRL+F. However, this won't work if the page is using virtualised scrolling (common with React et al. SPA for performance reasons, to avoid huge DOM trees as the page expands). The majority of content that is outside of the visible window will simply be unmounted from the DOM. I'm not sure what the best-practice for a webapp designer is here? P…

> Perhaps intercepting Ctrl+F Please don't ever do that. I know one site that does this and I hate it.

Discourse [1], popular forum software, does this as well.

[1] https://www.discourse.org/

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#62

I see lots of replies suggesting scrolling for a long time and then using CTRL+F. However, this won't work if the page is using virtualised scrolling (common with React et al. SPA for performance reasons, to avoid huge DOM trees as the page expands). The majority of content that is outside of the visible window will simply be unmounted from the DOM. I'm not sure what the best-practice for a webapp designer is here? P…

1. Open devtools. Disable cache. Reload the page. Go to sources panel. CTRL-SHIFT-F. Enjoy the JSON response.

2. Alternative: same but with web debugging proxy like Fiddler or Charles.

Yep. For JS-heavy pages with virtual scrolling (i.e. removing from DOM stuff that is out of viewport) there's no better solution.

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#63
post #26

For reddit specifically, the answer seems to be to use "old.reddit.com" instead of "www.reddit.com". The is no general solution. Infinite scroll style web apps are implementing their own content view, in essence a web browser inside a web browser. It will never behave as users expect.

This add-on for Firefox is helpful for that (redirects all www to old): https://addons.mozilla.org/en-US/firefox/addon/old-reddit-re...

I presume this is the corresponding Chrome extension: https://chrome.google.com/webstore/detail/old-reddit-redirec...

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#64
post #56
post #11

Go to Inspect element and do control + F to search for the string.

This is no different than scrolling down and ctrl+F. Infinite scroll doesn't load content until you scroll down.

Ok I was assuming they meant that if they did control + F on the webpage and the string was towards the bottom area, the page would start infinite scrolling automatically after locating that string via search(and they wanted to avoid this). Heres a similar example, if I wanted to get the contact page link(located on the footer) on an infinite scroll page, I would never be able to get to the bottom because of infinite scrolling. But I could do a Ctrl +f on the inspector to locate the "contact" string and copy the contact page link from there.

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#65
post #61

Earlier quoted context omitted.

> Perhaps intercepting Ctrl+F Please don't ever do that. I know one site that does this and I hate it.

Discourse [1], popular forum software, does this as well. [1] https://www.discourse.org/

Not a fan either, but at least it allows you to repeat the keystroke to do a native page search.

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#67

Other problems: - Scroll, scroll, scroll, and then click a link. Now click back. You have lost your place. - How can anyone link to a section far down? - Impossible to read or use anything in the footer. I suppose if you install infinite scrolling, you remove the footer. But I have heard a story where they forgot.

This. So much this. Infinite scrolling is one of the worst UI designs ever. Plus most I've seen are poorly implemented and buggy, which just makes it that much worse.

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#68

I see lots of replies suggesting scrolling for a long time and then using CTRL+F. However, this won't work if the page is using virtualised scrolling (common with React et al. SPA for performance reasons, to avoid huge DOM trees as the page expands). The majority of content that is outside of the visible window will simply be unmounted from the DOM. I'm not sure what the best-practice for a webapp designer is here? P…

> I'm not sure what the best-practice for a webapp designer is here? Perhaps intercepting Ctrl+F Oh god no, the solution is simple stop reimplementing the browser in the browser.

The result can give a much better UX if done properly. (If done poorly it's just frustrating of course...)

Just think of SPAs vs normal backend templated apps. The SPA can be much faster with poor network connection or when the data needed is large but unpredictable. Then the SPA can really shine, if routing is (re-)implemented well enough.

Re: Ask HN: How do you search for $string if a webpage “supports” infinite scroll?

#69

I see lots of replies suggesting scrolling for a long time and then using CTRL+F. However, this won't work if the page is using virtualised scrolling (common with React et al. SPA for performance reasons, to avoid huge DOM trees as the page expands). The majority of content that is outside of the visible window will simply be unmounted from the DOM. I'm not sure what the best-practice for a webapp designer is here? P…

> I'm not sure what the best-practice for a webapp designer is here? Perhaps intercepting Ctrl+F Oh god no, the solution is simple stop reimplementing the browser in the browser.

I would agree, if the opposite didn't make the page unusable. Infinite scrolling doesn't really work if you don't unload what's on the screen (at least it didn't the last time I tried it, in 2014).
Post reply on HN