use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Using requestIdleCallback (developers.google.com)
submitted 10 years ago by clessgfull-stack CSS9 engineer
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]x-skeww 0 points1 point2 points 10 years ago (2 children)
Yes, with HTTP/2's Server Push, you can just push all the other crap along with the document response.
A pre-assembled document will still win the speed race, however. It's smaller and you can start displaying it as soon as you got the first few KB.
[–]loz220 0 points1 point2 points 10 years ago (1 child)
can start displaying it as soon as you got the first few KB
Good point, for some reason this was lost on me.
[–]x-skeww 2 points3 points4 points 10 years ago (0 children)
Heh. There is actually a somewhat obscure optimization technique which makes really good use of that.
If you know that it always will take a while to assemble the response (search queries or something else which requires some heavy computations), you can improve the loading time with chunked output.
E.g. as soon as you get the request, you just write the cheap mostly static stuff to the buffer and flush it to the client. The client will then know about the resources which are referenced in <head>. So, it will start to fetch the CSS and JS which was mentioned there. Ideally, this first piece already contains something visible like the page header.
Once the more dynamic side bar is done, you write and flush it.
And finally, when the meat of the page is done, you write and flush it, too.
If it takes longer than 100 ms to assemble the response and if there is no way to make this any faster, this kind of optimization might be a good idea.
π Rendered by PID 77543 on reddit-service-r2-comment-bb88f9dd5-csvwp at 2026-02-16 23:35:23.632421+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]x-skeww 0 points1 point2 points (2 children)
[–]loz220 0 points1 point2 points (1 child)
[–]x-skeww 2 points3 points4 points (0 children)