Ephemeral Cookies

crumbs and chunks of knowledge

a collection of small to medium-size discoveries and personal notes, continuously updated.

November 10, 2025

Web app manifest, PWA

cookie stans yaccho's avatar
cookie stans yaccho
2mo

oookay i figured out why. apparently you need to add `"display": "standalone"` to your manifest.json for the website to work like a native web app! (note: this works on chrome, safari, edge, but not firefox, yet) developer.mozilla.org/en-US/docs/W...

display - Web app manifest | MDN

display - Web app manifest | MDN

The display manifest member is used to specify your preferred display mode for the web application. The display mode determines how much of the browser UI is shown to the user when the app is launched...


https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/display

React

in a React component, className is used in lieu of class to apply classes to elements. this is to avoid conflicts with vanilla javascript’s reserved keywords.

Miscellaneous / unsorted

Programming principles

summarized from this piccalilli article:

Programming principles for self taught front-end developers
The majority of us are a bunch of self taught people with rather spotty knowledge and that's fine! Kilian (also self taught) is here to share some of the computer science fundamentals you probably are missing with the aim to improve your code in the long term.
https://piccalil.li/blog/programming-principles-for-self-taught-front-end-developers/
  • the rule of three: generalize/abstract a functionality only when you have had to repeat the code three times.

    • firstly: you write some code.

    • secondly: you realize you need to reuse the same code in another place. don’t generalize yet. just copy-paste your code over. it’s fine. generalizing a functionality that’s only reused twice is over-engineering.

    • thirdly: now it’s time to generalize. this is also likely the point where you have a clearer idea how best to abstract the functionality for three different use cases.

  • make it work, make it right, make it fast, in that order.

  • write idempotent functions, which are functions that always return the same output given the same input. deterministic, i suppose?

  • single responsibility principle.

    • try to describe a function in english. if you catch yourself saying “and”, it probably violates this principle.

  • maintain a single level of abstraction/detail in each function. don’t mix high-level business logic with database access.

Github-flavored Markdown

footnotes

Cookies are delicious.[^cookies]

[^cookies]: Well, except pineapple-flavored ones.

renders to:

Cookies are delicious.[1]

------

1. Well, except pineapple-flavored ones. [a "return" symbol as an emoji which is a backlink to the statement]

(i don't actually know of any pineapple-flavored cookies this was just something random)

Subscribe to Ephemeral Cookies
to get updates in Reader, RSS, or via Bluesky Feed