637 karma · joined Sep 7, 2021 (5y ago) · 324 submissions
2.
Build Personal Web Applications(blog.roastidio.us ↗)
4 points · by derekzhouzhen · 6mo ago · 1 comment
comment 1y ago · link · parent
1) User goes to BAD website and enter credentials
2) BAD website use GOOD website to check if credential is valid
3) Pwned
It is just MITM attack. The moment you go to BAD and enter credential (password or one time code) you are done.
comment 1y ago · link · parent
No, generating HTML string and setting innerHTML is unsafe and slower than necessary. It is better to create DOM elements programmatically. HTML is for serialization of the DOM tree; if everything is done in javascript then you don't need HTML as an intermediate step.
comment 1y ago · link · parent
* web-component is a way to attache javascript to certain elements. There are other ways to do it, but sometime this way feel cleaner, like when you do server-side rendering and not using any javascript framework.
* shadow-dom is a way to organize your styles. As you said there are other ways to do it, but I find it useful because it offers full isolation, and is compatible with browsers 3 years back.
comment 1y ago · link · parent
It is a fully functional RSS reader. You are welcome to poke under the hood. The key insight is that I don't need reactivity, if re-rendering everything at every event is fast enough.
I believe this style of barebone SPA programming can scale up to at least 10,000 LOC javascript.
comment 2y ago · link · parent
Also, the article is about fully managed Wordpress vs self-hosted (or PaaS hosted) SSG. If the choice is between self-hosted Wordpress vs self-hosted SSG, I bet the outcome will be very different.
Now, you may wonder why the OP was not make an apple to apple comparison, like fully managed Wordpress vs fully managed SSG. Well, fully managed SSG does not exists, because it won't sell!
comment 2y ago · link · parent
I use several SSGs and wrote one myself. I still can't recommend any SSG to people willing to pay.
comment 2y ago · link · parent
https://developers.google.com/privacy-sandbox/3pcd/chips
you can still enable CHIPS in chrome but it won't happen for the mass after all.
comment 3y ago · link · parent
* non js enabled clients can see the page, think robots, SEO, etc.
* js enabled clients can help to perpetuate the content
* if the last js enable client had a network glitch, the content is still available.
comment 3y ago · link · parent
comment 3y ago · link · parent
* show multiple terminals on screen. The best solution is to use a tiling window manager. Both MacOS and Windows have limited windows tiling capabilities. * run long term TUI applications (like editors). The best solution is mosh. * run long term CLI applications (like shells). The best solution is dtach.
tmux helps all 3, but not particular good at either.