Frontend
- Islands Architecture - encourages small, focused chunks of interactivity within server-rendered web pages
async vs defer Link to heading
- Tweet
- Both
- Doesn’t block page loading and rendering.
- async
- Runs immediately after download.
- No guaranteed execution order (might differ from the order in the HTML)
- Beneficial for stand-alone scripts, not affecting initial DOM.
- defer
- Waits for HTML parsing to finish.
- Maintains script order in the document (beneficial for scripts that rely on each other)
- Beneficial for scripts that are not necessary until the page content has been loaded.
fetch
restricts the headers that can be accessed
Link to heading
- Default exposed headers:
Cache-Control
,Content-Language
,Content-Type
,Expires
,Last-Modified
,Pragma
- If you want to access other headers, the server needs to return an additional
header:
Access-Control-Expose-Headers: <accessible-header>
Frameworks Link to heading
- Alpine.js - Your new, lightweight, JavaScript framework.
- htmx - high power tools for HTML
- htmz
- hyperscript - An easy & approachable language for modern web front-ends
HTML over the wire Link to heading
- Hotwire
- htmx
- Hyperview - GitHub - Native mobile apps, as easy as creating a website.
- NativeScript
Math Notation Link to heading
Formats Link to heading
- ASCIImath
- LaTeX
- MathML
Libs Link to heading
- [Builtin MathML] - Can I use? - W3C
- CKEditor + MathType
- KaTeX - for React
- MathJax
- MathLive
- QuickLaTeX
Storages Link to heading
Type | Capacity | Supported Types | Lifetime | Access | |
---|---|---|---|---|---|
Cookies | 4KB | Strings | until expiration date or manually deleted by user or webapp | Shared between tabs and windows and with the server | |
Session Storage | 5MB | Strings | until tab is closed | Not shared between tabs or windows | |
Local Storage | 5MB | Strings | until manually deleted by the user or webapp | Shared between tabs and windows | |
IndexedDB | >50MB | Keys (Strings) and Values (objects, arrays, binary, etc.) | until manually deleted by the user or webapp | Shared between tabs and windows |
- Please Stop Using Local Storage - string only; synchronous; can’t be used by web workers; Any JavaScript code on your page can access;
- OWASP - HTML5 Security Cheat Sheet # Local Storage
- HTML Standard - Web Storage
- References: GPT-4; MDN - IndexedDB API; MDN - Shared Storage API; MDN - Web Storage API; Stack Overflow - What is the difference between localStorage, sessionStorage, session and cookies?