News for hackers. Stuff that matters.
Re:For your next side project, make a browser extension by sb8244 on Sunday January 15, 2023 @10:10PM (#34396379)
My favorite chrome extension pattern is state stored in background page that's communicated with injected content scripts via redux + actions.

You get a crazy powerful state management model that can allow traditional web pages to feel like SPA (your extension around it at least)

It's a shame manifest v3 absolutely butchers this use case because there's no long term live-state management other than opening an extension tab.

Re:For your next side project, make a browser extension by fregante on Sunday January 15, 2023 @10:45PM (#34396556)
Look into chrome.storage.session, they created it explicitly to allow in-memory storage for those scenarios. Not as easy as just setting a property, but good enough.
Re:For your next side project, make a browser extension by sb8244 on Sunday January 15, 2023 @11:33PM (#34396833)
I'd be curious about latency for frequent access and the 1MB quota. I think that may make it a similar solution on the surface, but fairly limited in usage.

I was powering a fairly large amount of state, to the point we had to diff state changes due to browser message costs. It was difficult to write, but was incredibly powerful.