7 comments

[ 3.4 ms ] story [ 33.7 ms ] thread
Why when I export rack to image the back button is disabled?
They just replace the page content with the image so when you hit back you are navigated back to HN or in your case nowhere since you opened it in a new tab.
For anyone looking for a better way of managing rack diagrams/assets, NetBox has a great and easy UI for this.
It's good to to see IndexDB used for data persistence to reduce the need for a backend API and network calls. It's an under-used technology that's available in every browser (https://caniuse.com/indexeddb).

I can recommend Dexie (https://dexie.org/) as a wrapper to make it a bit nicer to work with.

what makes this application better suited to IndexedDB over localstorage? its not a lot of data.

(genuine qtn, i tend to use localstorage a lot and have never handcoded IDB usage but have of course used libraries that used IDB)

what makes this application better suited to IndexedDB over localstorage? its not a lot of data.

I haven't found IndexedDB helps much the quantity of data (you can store more than localStorage, but most apps don't need close to that much). The advantage comes from iterating over the data (with cursors) for searching, and the fact that Indexeddb is versioned so you can migrate existing data to a new format when you deploy updates really easily.

ah, good, nuanced, points, thank you