#IndexedDB

Amadeus Maximilianamxmln@mastodon.design
2025-05-22

After building a paginated list of items using Dexie’s liveQuery feature, I’ve now refactored the project to use static queries instead.

The live updates aren’t worth the hassle and inconsistencies you have to deal with when using liveQueries—although I’d love for a future version of Dexie to make this easier (which it seems there are plans for in v5 🤞).

#buildInPublic #dexie #indexedDB

2025-05-04

Un exemple d'utilisation des services workers et d'IndexedDB (la base de données incluse dans les navigateurs) pour créer un système qui permet d'uploader une image même sans réseau et de faire l'upload réel lorsque le réseau est à nouveau disponible.

🔗 smashingmagazine.com/2025/04/b

#IndexedDB #progressivewebapps #upload #web

2025-04-28

Ok. Just culled ~20,000 of 25,000 #tumblr posts accumulated via #RSS over a month. I've gotta get to work on my own project applying basic statistics to this stuff. Think "reverse chronological + $all_your_own_filtering_and_sorting_and_bucketing". Not sure if I should do that within the confines of a #thunderbird add-on, or try some other approach. I really, really want to be able to use #sql for this stuff. It's a natural fit. But #sqlite seems to be a no-go for #WebExtensions. There is only #IndexedDB, which, in my limited experience with it, is absolute garbage to work with.

N-gated Hacker Newsngate
2025-04-07

Oh wow, another life-changing 🎉 web extension for the 0.0001% of users who lose sleep over managing databases! 🤓 Because clearly, what the world desperately needed was a way to browse, edit, and manage their secret stash of browser data like it's the next great frontier. 🚀
github.com/hummingme/kahuna

Dylan </closingtags.com>closingtags
2025-03-28

With the changes brought by Svelte 5, I found myself wanting to take advantage of performance improvements and harness the power of runes. But converting my stores to something 'rune-based' proved more challenging than I had hoped since so much of my codebase relied on stores.

Migrating Svelte Stores to Runes
closingtags.com/svelte-stores-

2025-03-12

My esteemed followers, you have posted a total of 375,809 statuses to the #fediverse. 22% of you have posted in the last 24h. You are a chatty bunch! ;-)

Check out my new #sideproject: *fedi-followers*. A privacy-friendly fediverse #followers explorer as #localonly #staticwebapp, decentrally hosted on the #ipfs. See who's actually following (and unfollowing) you over time and much more.

fedi--followers-data0-one.ipns

#decentralization #mastodev #esmodules #importmaps #nobuild #indexeddb #preact

2025-03-11

I've built a thing.

Sometimes my follower count seemingly fluctuates at random. To understand why, I dug into the #MastodonAPI and created "fedi-followers":

A privacy-friendly #fediverse #followers explorer as local-only static web app, decentrally hosted on the #ipfs. See who's actually following (and unfollowing) you over time and much more.

fedi--followers-data0-one.ipns

#mastodev #javascript #webapp #staticwebapp #nobuild #esmodules #importmaps #indexeddb #preact #htm

2025-02-24

Использование браузерного хранилища для управления состоянием приложения

Современные web-фреймворки для реализации управления состоянием используют библиотеки, такие, например, как Redux для React или Pinia для Vue. У традиционной реализации управления состоянием есть недостатки. Store в таком варианте является частью скрипта страницы, и его данные при её перезагрузке теряются. Кроме того, если нам в приложении нужно организовать управление отображением контента в нескольких окнах браузера, оказывается, что традиционный Store не может этого обеспечить.

habr.com/ru/articles/884418/

#indexeddb #dexie #store #реактивность #модульное_тестирование #оффлайнприложения #vitest #testinglibrary #вебразработа

2025-01-20

localForage — Что делать если localStorage уже не хватает?

localStorage и sessionStorage сильно ограничены в размере - всего 5 МБ, а использование IndexedDB для обхода этого ограничения не всегда является удобным из-за сложного API. localForage решает сразу обе проблемы!

habr.com/ru/articles/874980/

#localstorage #localforage #хранилище #sessionstorage #javascript #webapi #indexeddb

2025-01-19

Would be great if #IndexedDB and #localStorage had a way to specify an expiration date. The browser would automatically remove stale values without needing to visit the website.

Don't know if it has been discussed or suggested.

xoron :verified:xoron@infosec.exchange
2024-12-13

Bottom-up Javascript Storage Management

i wanted to see if we can create #asynchronous bottom-up #javascript #BrowserStorage, we have the basics to put together a state management system. State management solutions in apps typically have ways to persist data.

I wanted to explore if there are any benefits to define and manage state in #webcomponents with a bottom-up approach. I wanted to see if it could give a greater flexibility in developing a #UI and not having to worry about persisted storage management.

positive-intentions.com/blog/b

#functional #webcomponents #async #asynchronous #state #indexedDB #storage #persistence #management #javascript #html #webcomponents #UILibrary #web-components #custom-elements #lit-html #lit #opensource

xoron :verified:xoron@infosec.exchange
2024-11-11

"Encryption at Rest" for JavaScript Projects

Following a previous post (infosec.exchange/@xoron/113446), which can be summarized as: I'm tackling bottom-up state management with an extra twist: integrating encryption at rest!

I created some updates to the WIP pull-request. The behavior is as follows.

- The user is prompted for a password if one isn't provided programmatically.
- This will allow for developers to create a custom password prompts in their application. The default fallback is to use a JavaScript prompt().
- It also seems possible to enable something like "fingerprint/face encryption" for some devices using the webauthn api. (This works, but the functionality is a bit flaky and needs to be fixed before rolling out.)
- Using AES-GCM with 1000000 iterations of PBKDF2 to derive the key from the password.
- The iterations can be increased in exchange for slower performance. It isn't currently configurable, but it might be in the future.
- The salt and AAD need to be deterministic and so to simplify user input, the salt as AAD are derived as the sha256 hash of the password. (Is this a good idea?)

The latest version of the code can be seen in the PR: github.com/positive-intentions

I'm keen to get feedback on the approach and the implementation before i merge it into the main branch.

#JavaScript #Encryption #IndexedDB #WebDevelopment #CryptoAPI #FrontendDev #ReactHooks #StateManagement #WebSecurity #OpenSource #PersonalProjects

2024-11-11

Does anyone have a good example of using #Leptos with #IndexedDB ? Something that shows best practices for managing the IdbDatabase and IdbOpenDbRequest values and making them available to any component (assuming I'll need to use a context or store)

xoron :verified:xoron@infosec.exchange
2024-11-08

"Encryption at Rest" for JavaScript Projects

I'm developing a JavaScript UI framework for personal projects, and I'm tackling state management with an extra twist: integrating encryption at rest!

Inspired by this React Hook: Async State Management (positive-intentions.com/blog/a), I’m extending it to support encrypted persistent data. Here's how:

✨ The Approach:

Using IndexedDB for storage.

Data is encrypted before saving and decrypted when loading using the Browser Cryptography API.

Event listeners will also be encrypted/decrypted to avoid issues like browser extensions snooping on events.

The password (should never be stored) is entered by the user at runtime to decrypt the data. (Currently hardcoded for now!)

The salt will be stored unencrypted in IndexedDB to generate the key.

🔗 Proof of Concept:
You can try it out here: GitHub PR (github.com/positive-intentions). Clone or run it in Codespaces and let me know what you think!

❓ Looking for Feedback:
Have I missed anything? Are there better ways to make this storage secure?

Let's make secure web UIs a reality together! 🔒

#JavaScript #Encryption #IndexedDB #WebDevelopment #CryptoAPI #FrontendDev #ReactHooks #StateManagement #WebSecurity #OpenSource #PersonalProjects

2024-11-05

🔨 #Database․build: Browser-based #PostgreSQL Development Environment

💻 Runs completely in-browser using #WASM technology powered by #PGlite, with data persistence via #IndexedDB
🤖 Features #AI assistance for database operations, including smart CSV imports and automated report generation
📊 Built-in tools for creating charts and database diagrams with drag-and-drop functionality
⚡ Developed using #Nextjs framework with #S3 deployment capabilities in development
🔄 #Opensource project (Apache 2.0) by the #Supabase community

Learn more: github.com/supabase-community/

Inautiloinautilo
2024-11-01


Don’t use localStorage for sensitive data · Alternatives for tokens, secrets, and private info ilo.im/160lq1

_____

Brian Swetlandswetland@chaos.social
2024-10-16

If I'm going to store #JavaScript objects in #IndexedDB, is there any significant size or performance difference between storing them as Objects (letting IndexedDB serialize them), strings (post-JSON.stringify), ArrayBuffers (post-TextEncoder.encode), or Blobs (wrapping the ArrayBuffer)?

My assumption is the space difference is minimal or none, and that there may be some performance gain for not doing the JSON -> UTF8 -> bytearray conversion in discrete steps in Javascript.

#WebDev #Questions

2024-10-08
If I have to get and put to update objects in an #IndexedDB, does that mean blobs will be copied every time I update something, or is it just a reference to the same data in memory and there's no performance issue?

Should I store large blobs in a separate object store from the metadata or is it fine to keep it together? #js #javascript

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst