Random Link ¯\_(ツ)_/¯ | ||
Feb 9, 2025 | » | WWW Watering Hole
4 min; updated Feb 9, 2025
As the web evolves, where do practitioners congregate and exchange ideas? Working Groups develops standards and guidelines to help everyone build a web based on the principles of accessibility, internationalization, privacy and security. publishes standards and drafts , which are then implemented by browser vendors, e.g., Chromium, Firefox, and Safari. Topics of interest: accessibility, browser, CSS, data, DOM, digital publishing, graphics, HTML, HTTP, internationalization, media, performance, privacy, protocol, security, web API, web fonts, Web of Things (WoT), and XML.... |
May 5, 2024 | » | Inheritance
2 min; updated May 5, 2024
Mixins Introduced to mixins by . Didn’t know that there are passionate advocates for this, e.g., ’s “You can even look at normal subclass inheritance as a degenerate form of mixin inheritance where the superclass is known at class definition time, and there’s only one application of it.” A mix-in is an abstract subclass. This technique is especially useful in languages where a class can only have a single superclass.... |
Apr 28, 2024 | » | The Cards Manager
4 min; updated Apr 28, 2024
UI Design Legacy card viewing UI at /browse. This time we’ll use the more semantic and a11y-friendly <dialog> element . Centering it in the page is done by the browser, and that saves us a bit of hassle – thought it would have been feasible with how <search-bar>’s <ul> floats above the page. CardsManager Interface The previous/next buttons make use of the CardsManager object that has the API:... |
Apr 19, 2024 | » | Client/Server Interface
8 min; updated Apr 19, 2024
How to handle redirects without setting window.location.href? Right now, there’s a pattern of doing: sendHTTPRequest("POST", "/login/", {}) .then((_) => { window.location.href = "/"; }) .catch((err) => { console.error(err); }); Isn’t this something that the server can do? In response, why not issue a redirect? Screenshot of the redirect chain from /login. The POST request gets a 303 (See Other) redirect to /home. The browser then makes a GET request to /home, which results in a 304 (Not Modified).... |
Apr 18, 2024 | » | Use of Local Storage
3 min; updated Apr 18, 2024
Back when I wrote this, the motivation for using localStorage was to reduce the trips to the server so that the app is usable offline. However, with two data stores (localStorage and the server), the former has a possibility of going stale. What usage is correct and how can we avoid stale data? localStorage['session_info'] getAccountInfo: () => AuthenticateUser | null fetches the session_info entry and JSON.parses it into an AuthenticateUser. This is a possible failure point because the parsed JSON cannot be trusted to be a valid AuthenticateUser instance.... |
May 29, 2023 | » | Query Languages for Data
3 min; updated May 29, 2023
Query Languages for Data If you have a list of animal species and you want to return only the sharks in the list, a relational algebra expression would be \( \text{sharks} = \sigma_{\text{family = “Sharks”}}(\text{animals}) \). SQL queries follow the structure of relational algebra closely: SELECT * FROM animals WHERE family = 'Sharks'; … while an imperative query would be: function getSharks() { let sharks = []; for (let i = 0; i < animals.... |