News for hackers. Stuff that matters.
Re:Practical Front-End Architecture by Scarbutt on Tuesday September 21, 2021 @11:50AM (#28606275)
For example, Ikea for product lists sends mini chunks of simple HTML. No JS involved.

Can you elaborate how? like some turbolinks thing?

Re:Practical Front-End Architecture by spiralx on Wednesday September 22, 2021 @11:17AM (#28617317)
The back-end can render that content when requested, adding very little overhead to an AJAX request just returning the raw data, and it can pre-render and/or cache objects as well. Both Facebook and Reddit do similar when loading extra content into an existing page - they embed HTML content in the JSON response for things like profile popovers or when loading more comments. Saves the front-end from having to render a template (takes time to load the template beforehand and time to render it, maybe for many items) or build it programmatically. Directly using AJHX to get HTML is the same when there's just a chunk of HTML with no metadata.
Re:Practical Front-End Architecture by lampe3 on Tuesday September 21, 2021 @03:58PM (#28609208)
I don't work for Ikea so I don't know how it is implemented.

What you can see in the Network tab is that you get chunks of html from the backend which have all the markup

Other e-commerce stores do that too.

Sometimes these chunks also have js in them.