4 ms·
JavaScript. They use too much of it.
by NullPrefix 7y ago
JavaScript. They use too much of it.
- threeseed 7y agoJavascript has nothing to do with those decisions. It is purely design.
- AlchemistCamp 7y ago> Javascript has nothing to do with those decisions. It is purely design. How do you implement infinite scroll without JavaScript? The theme tying all their choices together is costs they're willing to inflict upon their users. Bloated JS payloads are simply one example.
- NullPrefix 7y ago> How do you implement infinite scroll without JavaScript? Technically it's possible. Render the website server side as an image. Chrome 75+ supports native lazy loading of images, so a series of them stacked vertically is needed. Each image represents a new page, scroll through them to navigate. Click detection can be done with a <map> tag.
- furyofantares 7y agoI think you can also just keep sending html. Send a page with page2.png at the bottom and keep the connection open. This is a sentinel image to detect scrolling — when page2.png is requested, use this as a command to tell the server to start sending html for page 2 on the original connection, which would have page3.png at the bottom.
- NullPrefix 7y agoThis is even simpler. Forgot that HTML can be executed while loading.
- orange8 7y agoJavaScript is now a marketing choice? Wow!
- NullPrefix 7y agoCan you even?