Disruption to CTRL+F search, pls provide alternate method

Hi,

I was on the following discourse forum

And I needed to find the word “mac”

Using CTRL+F, it could only find this string when it was on screen. Scrolling itself made matches disappear.

It also disrupts the scroll position match indicator in the scroll bar

I understand the claim that this is to “save memory”, but this system has 64 gigabyte of memory and this page is less than 100 kilobytes of text. So I understand that this is actually and anti-scraping feature like facebook utilises to prevent (but fail) scraping.

Searching for this strange bug, I found an absolute sea of complaints about this extremely disruptive anti-feature.

What are the alternatives ?

Can it be disabled client side ?

What about loading the page in print mode ?

Is there any way to force a full text only dump of the entire page so I can just view it in a text editor ?

What about greasemonkey script, anything that can break the feature that unloads from memory the text so it can be searched ?

Is my only option to penetrate the database server, exfiltrate all discourse content and then write code to display the comment thread without these disruption ?

I see complaints about this from 2014, so I imagine there is no desire to solve this issue and it’s a “feature not a bug” but a feature for the owners not the user ?

What is the “meta” on this very serious problem that makes me DREAD ever having the misfortune of having to navigate a “discourse” forum ?

Yes, I’m bitter, how can you tell ?

I asked the slop machine for giving me a print version

And after about 1 minute of processing the preview, it DOES work

Append /print to load up to 100 posts at a time, see it in action here: https://forum.openwrt.org/t/re-luci-add-support-for-managing-tags-in-dhcp-and-dns-configuration-web-page/220640/print

Yes, see https://forum.openwrt.org/raw/220640

Thanks !

raw method does it for me,

is there an addon to load every page raw automatically by any chance

I was writing another message sorry I can’t stay all day to wait for the time out one image at a time.

Yes I have tried it but

I do not wish to use server-side search

and also the results are, not in a way usable for me

Here is what that looks like

I’m sorry,

I was trying to work out a problem in openwrt

And I was getting really frustrated with not being able to search as I expect a browser to be able to search.

I’m sorry that you feel I am being impolite not to spend time here, but please understand from my perspective.

I am struggling to use the software, to such an extent that I start to looks for solutions to overcome the problem.

And when I am unable to find the solution, I find the name of the software, find its disccusion space, create an account, do the captcha, do the email verification, search the forum for similar questions, find some, they’re closed, find others, decide to make a new post, start writing, write my entire comment, with many picture examples

and then I press reply, and I get an error message that you can only post one image at a time

Which would require me to edit my entire message which depends on those screenshots for coherence.

So I try to cut my message into 1 image per post, but then there is an unknown timeout period to wait out between messages, and I just want to get back to work and I’m starting to think, these guys surely know about the struggle, so I’m not adding anything by telling them how much I am disturbed by this

but no, as a power user, I have a duty to let devs know of the struggles of other users and now it’s been like a solid half hour of struggling to tell about the struggle.

So… I’m sorry if this is impolite, but I don’t want to spend another unknow number of extra minutes to discover and perform whichever actions are required to post my message.

But I assure you, I don’t mean to be impolite to you, I am just very frustrated !

Hey folks, I ran into the same annoying issue with CTRL+F on Discourse—posts that aren’t currently on screen just disappear from search because of the lazy-load / unload-from-memory system. Even with 64GB RAM, you can’t search the whole topic in-browser. From what I gather, this is more of an anti-scraping feature than a memory-saving one. Here’s what worked (and safer) alternatives I’ve found:

  1. Use the Print View: Add /print to the end of the topic URL, e.g., https://forum.example.com/t/topic-name/12345/print. This loads all posts in the topic at once and works with browser search (CTRL+F). The layout is simplified, but perfect for full-text search.

  2. Scroll Until Everything Loads: Keep scrolling until the lazy-load system has rendered all posts in the DOM. CTRL+F will then find everything. It can be tedious for long threads, but works without extra tools.

  3. Use the Discourse API: Every topic has a JSON endpoint like https://forum.example.com/t/{topic_id}.json. You can extract all posts from the post_stream.posts array, open in a text editor, and search comfortably. Safe, official, and works regardless of lazy-load.

  4. Userscript / Greasemonkey Approach: You can automate full-page post loading with this simple userscript for Chrome/Firefox. It auto-clicks “load more posts” until the topic is fully rendered:

// ==UserScript==
// @name         Discourse Load All Posts
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Auto-click "load more posts" to fully render topic for search
// @match        https://*/*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    function loadAll() {
        const button = document.querySelector('.load-more[data-more-url]');
        if (button) {
            button.click();
            setTimeout(loadAll, 500); // wait and try again
        }
    }
    window.addEventListener('load', () => {
        setTimeout(loadAll, 1000); // start a second after page load
    });
})();

After it’s done, CTRL+F will search everything in the thread.

Export / External Search: Use print view or API JSON to export posts to PDF, HTML, or plain text. Open in an editor like VSCode or Notepad++ for full-text search.

:warning: Don’t try server hacks: Penetrating the database or scraping content server-side is illegal and unnecessary. Use API / print view / userscript—they’re all safe and work reliably.

TL;DR: Easiest: /print view. More flexible: API JSON or userscript. CTRL+F works once all posts are loaded in DOM. Hope Discourse team sees this and maybe considers a “full search” option someday—it’s a serious UX problem for anyone doing research or deep topic reading :sweat_smile:

Does that greasemonkey script work ?

Have you made it ?

Just to clarify about the userscript I shared: I wrote it specifically to work with the forum I was using, so there might be some differences in HTML structure if you try to adapt it to other sites. The script works on standard Discourse topics that use the “Load More Posts” (lazy-load) system by automatically clicking the load more posts button repeatedly until all posts are loaded into the DOM. Once all posts are loaded, you can use your browser’s CTRL+F to search for any keywords normally.

In fact, many people have been using Tampermonkey/Greasemonkey for years to handle Discourse like this, and it works well even on very large forums.

:warning: Note: Some forums might change the class of the button (e.g., `.load-more[data-more-url]`), so you may need to tweak the selector slightly to match the actual button.