News for hackers. Stuff that matters.
Re:Show HN: Speed up your site by running JavaScript when th... by bombolo on Thursday November 24, 2022 @09:49AM (#33731873)
I have an idea: why not speed up your site by NOT running js at all?
Re:Show HN: Speed up your site by running JavaScript when th... by pvg on Thursday November 24, 2022 @10:05AM (#33732077)
That's a fine personal choice but don't snarkpoop on other people's Show HN's.

https://news.ycombinator.com/showhn.html

Re:Show HN: Speed up your site by running JavaScript when th... by bombolo on Friday November 25, 2022 @02:39AM (#33740157)
If other people's choice had no influence on me, I would totally agree with you.
Re:Show HN: Speed up your site by running JavaScript when th... by pvg on Friday November 25, 2022 @02:53AM (#33740228)
It's not a matter of agreement, it's just that this sort of comment is offtopic in Show HN's.
Re:Show HN: Speed up your site by running JavaScript when th... by bombolo on Friday November 25, 2022 @04:09AM (#33740614)
> When something isn't good, you needn't pretend that it is,

from the link you provided…

Re:Show HN: Speed up your site by running JavaScript when th... by pvg on Friday November 25, 2022 @10:52AM (#33743482)
That's right, except you skipped all the other bits in the link provided -

Be respectful. Anyone sharing work is making a contribution, however modest.

Ask questions out of curiosity. Don't cross-examine.

Instead of "you're doing it wrong", suggest alternatives. When someone is learning, help them learn more.

When something isn't good, you needn't pretend that it is, but don't be gratuitously negative.

Reflexive snark comment that's not even about the thing being shown is none of that. And there's also

Please don't post shallow dismissals, especially of other people's work.

from

https://news.ycombinator.com/newsguidelines.html

Re:Show HN: Speed up your site by running JavaScript when th... by bombolo on Tuesday November 29, 2022 @10:11AM (#33788492)
I did suggest an alternative: not running js.

You clearly don't like my idea, but that doesn't mean it isn't valid.

Re:Show HN: Speed up your site by running JavaScript when th... by SketchySeaBeast on Thursday November 24, 2022 @10:02AM (#33732039)
But what if we want a site that's more interactive than a blog?
Re:Show HN: Speed up your site by running JavaScript when th... by MichaelCollins on Thursday November 24, 2022 @03:29PM (#33735865)
Who's 'we'? The user, or the web dev? Most javascript exists to scratch the itch of the webdev who made it, doing shit no user ever asked for.
Re:Show HN: Speed up your site by running JavaScript when th... by SketchySeaBeast on Thursday November 24, 2022 @04:29PM (#33736436)
Well, people who don't want to keep refreshing the page to see the site update. That's not just "[scratching] the itch of the webdev who made it".
Re:Show HN: Speed up your site by running JavaScript when th... by onion2k on Thursday November 24, 2022 @09:56AM (#33731964)
But then my contact form won't work!

ducks

Re:Show HN: Speed up your site by running JavaScript when th... by newbieuser on Thursday November 24, 2022 @10:10AM (#33732137)
you are absolutely right. we should completely throw away the development of browser APIs over the years and develop sites with html 4.0
Re:Show HN: Speed up your site by running JavaScript when th... by togaen on Thursday November 24, 2022 @10:36AM (#33732512)
Totally agree with this, actually.
Re:Show HN: Speed up your site by running JavaScript when th... by RunSet on Thursday November 24, 2022 @10:20AM (#33732287)
This but unironically.
Re:Show HN: Speed up your site by running JavaScript when th... by dahfizz on Thursday November 24, 2022 @10:43AM (#33732595)
The web was a much better place 10 years ago.
Re:Show HN: Speed up your site by running JavaScript when th... by somishere on Thursday November 24, 2022 @06:03PM (#33737209)
a sweet spot?
Re:Show HN: Speed up your site by running JavaScript when th... by sirwhinesalot on Thursday November 24, 2022 @10:57AM (#33732766)
Is... is it bad that I think that might not actually be so bad? I never had an issue with full page reloads of a damn blog, but somehow it's all SPA garbage these days and all the sites have errors in one or more browsers but miraculously keep chugging along (except when they don't and there's a blank page).

At least in the old days if CSS or JS didn't load, you still got a semi-usable page.

Turning HTML+CSS+JS into an application platform has been one of the most fundamentally stupid things we've done as a field and we'll keep paying for it for years on end, second only to not adding slices to C.

Re:Show HN: Speed up your site by running JavaScript when th... by wonnage on Thursday November 24, 2022 @12:50PM (#33734129)
Incoming flood of edgelord comments saying they think that would be better
Re:Show HN: Speed up your site by running JavaScript when th... by newbieuser on Thursday November 24, 2022 @01:02PM (#33734327)
I made this comment to summon them. they come out of their caves when they see something about no js lol
Re:Show HN: Speed up your site by running JavaScript when th... by balls187 on Thursday November 24, 2022 @03:38PM (#33735956)
The docs are confusing.

This is really about how to make your UI more responsive by performing intensive tasks only when your browser isn’t doing any other tasks related to the javascript code.

In non JS applications, you typically would do this on any thread but the UI thread. But with Javascript, you have the option of doing tasks on the main thread, but only when all other tasks are not being executed. IE a priority queue.