It should be possible to use Lemmy while having Javascript disabled in the browser.
A checklist of things that need to be done for this.
Okay this didn't work for several reasons:
Try out a testbed using this: https://github.com/heineiuo/isomorphic-ws
Next.js also works with Inferno (or did, last time I tried it, that might not be true in Next 8 according to this issue), and can work with websockets (open in a componentDidMount).
I've tried and failed twice at this, including using the tutorial from tylermcginnis above. Other than for analytics, there just doesn't seem to be much point: since we upped the DB performance, the page already loads in less than 2 seconds. Basically a LOT of work, on every component just to minimize that initial page load, after which all that work is pointless.
This is really a duplicate of #347 .
Crazy idea: Do you think we can have a fork of the webclient run on the server to pre-render the initial page and just have hooks that the browser can execute which connects it to web sockets?
That is what isomorphic means, and its not easy to implement.
That is what isomorphic means, and its not easy to implement.
As in literally having the same single page web app run on the server? I always imagined that the typical implementation would be (for Lemmy) to render the HTML using Rust through Actix.
You can read about how isomorphic apps work in the links above.
It should be possible to use Lemmy while having Javascript disabled in the browser.
Do I understand correctly that you want the site to be usable with JavaScript disabled? Answers etc.
Perhaps for search engines can be made easier. Look at Discourse with JavaScript disabled or under the User Agent of any search engine.

If Javascript is missing, the script displays the templates: https://github.com/discourse/discourse/tree/master/app/views
This is not for users, but for search engines.
Perhaps it is easier to do this in Rust, if there is no JavaScript, then a different template is shown. This will be more static, but this is normal for search engines. This is not for users.
Do I understand correctly that you want the site to be usable with JavaScript disabled? Answers etc.
In the future, yes, but currently, it will show a little message saying javascript needs to be enabled to view this site.
This is not for users, but for search engines.
Correct, its mainly for search engines, but also important when other sites want to link to lemmy pages, so that they can build link previews, etc.
Dont forget that some people prefer to use the web without Javascript. A lot of sites today makes this impossible, so it would be great if we could set a good example!
I personally don't have time to build a non-interactive / read-only client, but if someone else wants to make one, they could always do so.
I love Lemmy but I don't run JS in my browser for security and privacy reasons.
Could this be integrated and used for stuff like described above?
https://github.com/IronOxidizer/lemmy-lite
We will likely add a route to make lemmy-lite available, once ironoxidizer gets a docker working, and feels its ready. But I don't know if it'd be usable to solve our problem here.
Making lots of progress on this recently. https://github.com/LemmyNet/lemmy-isomorphic-ui
Most helpful comment
Dont forget that some people prefer to use the web without Javascript. A lot of sites today makes this impossible, so it would be great if we could set a good example!