Hacker Newsnew | past | comments | ask | show | jobs | submit | jfhr's commentslogin

> You're supposed to address this by adding the base URL on the end, but then correctly obtaining that can be brittle.

Isn't that what document.baseURI is for? At least that's my understanding:

new URL("/whatever", document.baseURI)


Unless you need to support ancient browsers [1], I'd go the easy way and leave the URL parsing to the browser, e.g. `['http:', 'https:', 'mailto:', 'tel:'].includes(new URL(value, location.origin).protocol)`

[1] https://caniuse.com/url


JavaScript elegance is always welcome!



> The new systemd-resolved package will not be installed automatically on upgrades as it has been split into a separate package. If using the systemd-resolved system service, please install the new package manually after the upgrade, and note that until it has been installed, DNS resolution may no longer work as the service will not be present on the system.

will installing over the internet work without DNS resolution?


yes, as the script adds/replaces the sources.list lines, then apt i downloads the packages, only then it starts the installation of them


But you can't (easily) get the deb package for systemd-resolved after the upgrade has (possibly) broken DNS?


yeah, that's not ideal, or possibly very bad UX, depending on how the update happens. (if the running stub resolver of resolved is not shut down, or at least an effort is made to fix resolve.conf during removal of the old package, then it might cover most of the users. as far as I understand the 11 -> 12 upgrade works without manual intervention, and this is an edge case, as systemd-resolved is not enabled by default on Debian 11.)




what about tumblr? that's where seemingly a lot of former twitter users are moving to


just wait until he hears about vending machines.


Interestingly I got Doctorow too for (technical) blog posts. For fiction stories it gave me: James Joyce, Arthur Clarke, and Kurt Vonnegut.


yeah I should've thought of that. fixed it now


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: