CORS vs CSP
CORS allows a site (data provider) to give permission to another site to read the data using the visitor’s browser and credentials. CSP allows a site to prevent itself (data consumer) from loading content from unexpected sources as a defense against XSS.
Debounce, Throttle and RequestAnimationFrame
Debounce groups a sudden burst of events into a single one; throttle guarantees a constant flow of executions every X milliseconds; requestAnimationFrame is a throttle alternative. They are web techniques to optimize UI events handling and make transitions smoother.
Designing very large (JavaScript) applications
Very Large JS App = a lot of developers + large codebase. How to deal with a lot of developers? Empathy and good programming model. How to deal with a large codebase? Code Removability/Delete-ability. Be careful with abstractions.
How to Get Lucky?
How to get lucky? Participate in new activities and experience new things; trust your intuition and interests; be optimistic, when playing soccer, take a few more shots, and you'll eventually score; be good at finding the silver lining in bad situations. The essence of good luck is creating opportunities, discovering opportunities, and having the courage to act.
PWA for Mobile Web
A progress web can be put to the home screen by Chrome and Safari, work offline with service workers, increase engagement with push notification and improve the conversation rate for new users across all browsers. That’s why more and more websites start to implement PWA.
Rewriting Facebook.com
Facebook has evolved from its initial PHP server-side rendering to today over 16 years. The external environment for web development has changed dramatically, and the cost of developing new features on the old architecture is increasing. To achieve an "app-like experience" and outstanding performance, the entire main website was rewritten using React and Relay, based on two principles — "as little as possible, as early as possible" and "enhancing developer experience to serve user experience."
Web App Delivery Optimization
There are two golden rules for web app delivery optimization. One is to minimize latency and the other is to minimize payload. We also have some advice for applying protocol-specific optimizations.
What is PWA?
PWA = web app + native app in install-ability, link-ability, user experience, user stickiness.
Why PWA?
Why do we need Progressive Web App (PWA)? Compared to native apps, the traditional web app has the problem of "Broad Reach, Low Engagement".