How JavaScript works
#52 · 2022-10-29 · JavaScriptIn 2017, SessionStack started a thorough series of blog posts explaining how JavaScript works. And even though it has been a while since then, these posts are still worth a read.
- An overview of the engine, the runtime, and the call stack
- Inside the V8 engine + 5 tips on how to write optimized code
- Memory management + how to handle 4 common memory leaks
- Event loop and the rise of Async programming + 5 ways to better coding with async/await
- Deep dive into WebSockets and HTTP/2 with SSE + how to pick the right path
- A comparison with WebAssembly + why in certain cases it’s better to use it over JavaScript
- The building blocks of Web Workers + 5 cases when you should use them
- Service Workers, their lifecycle and use cases
- The mechanics of Web Push Notifications
- Tracking changes in the DOM using MutationObserver
- The rendering engine and tips to optimize its performance
- Inside the Networking Layer + How to Optimize Its Performance and Security
- Under the hood of CSS and JS animations + how to optimize their performance
- Parsing, Abstract Syntax Trees (ASTs) + 5 tips on how to minimize parse time
- The internals of classes and inheritance + transpiling in Babel and TypeScript
- Storage engines + how to choose the proper storage API
- The internals of Shadow DOM + how to build self-contained components
- WebRTC and the mechanics of peer to peer networking
- Under the hood of custom elements + Best practices on building reusable components
Post #19 was published in August 2018. Two and a half years later, SessionStack continued the series with new posts. Most of these are about general JavaScript topics and go a little less deep. If you are interested, you can find many of them by searching their blog for the term "How JavaScript works".