Skip to content

Instantly share code, notes, and snippets.

DNS

Hostnames were not enough.

Originally, everything just had a hostname, and you either memorized the IP address or added it to /etc/hosts.

Managing hosts files was a problem, resulting in at least two systems to solve discoverability: NIS and DNS.

NIS was invented by Sun and assumed that every NIS client was able to store and query a map of the entire local network.

@floatingatoll
floatingatoll / is-private-mode.js
Created January 8, 2019 19:37 — forked from jherax/is-private-mode.js
Detect if a browser is in Private Browsing mode
/**
* Detect if the browser is running in Private Browsing mode
*
* @export
* @returns {Promise}
*/
export default function isPrivateMode() {
return new Promise((resolve) => {
const on = () => resolve(true); // is in private mode
const off = () => resolve(false); // not private mode
@floatingatoll
floatingatoll / hsts-redirect-loop.md
Last active November 20, 2023 17:59
Firefox reports HSTS + HTTPS-to-HTTP redirects as a redirect loop

If you have ERR_TOO_MANY_REDIRECTS / "The page isn't redirecting properly" in Firefox, but your network console doesn't show any obvious loops, and your site includes HSTS / HTTP-Strict-Transport-Security headers;

Then you may have an https:// request that contains an Location: http:// response, which Firefox will occasionally refuse to upgrade to https://.

Update the redirect destination to https:// and see if that solves your problems.