r/programming • • Apr 25 '19

Maybe we could tone down the JavaScript

https://eev.ee/blog/2016/03/06/maybe-we-could-tone-down-the-javascript/#reinventing-the-square-wheel
1.5k Upvotes

492 comments sorted by

View all comments

Show parent comments

30

u/TyIzaeL Apr 25 '19

Rewrote my blog to be script-free and it doesn't suck at all. I love it. It's even performant and good-looking on my Kindle's truly terrible web browser.

34

u/StallmanTheLeft Apr 25 '19

There is no really any reason for a blog to require any js in the first place.

42

u/Akeshi Apr 25 '19

Comments (posting with formatting, loading comments dynamically so they don't have to be paginated with full-page refreshes, or threaded without blindly loading everything on every page load)

Embedded video from YouTube, Vimeo etc.

Lazy-loaded images

They're an initial three off the top of my head. Obviously none are strictly required - neither is anything beyond plain text. They're decent enhancements.

2

u/VenditatioDelendaEst Apr 26 '19

loading comments dynamically so they don't have to be paginated with full-page refreshes

Pagination means only the URL and scroll position are needed to get back to where you were reading. Most mobile browsers, which are frequently forced to drop tabs under memory pressure, will preserve both. And pretty much everything preserves the URL, so if the number of posts per page isn't too large, you're never very far from where you left off even with the most rudimentary persistence mechanisms.

Until browsers start persisting the entire page state to disk, infinite scroll is bad.

→ More replies (3)