pixelmund / svelte-kit-cookie-session

⚒️ Encrypted "stateless" cookie sessions for SvelteKit
MIT License
184 stars 12 forks source link

Feat: Chunked cookies #51

Closed hrueger closed 1 year ago

hrueger commented 1 year ago

Hi @pixelmund, first of all, thanks for this excellent library.

However, I found, that when using it to save a shopping cart for example, you can run out of space quickly. If the cookie gets too large, it is ignored by the browser. Maybe chunked cookies would be an option?

pixelmund commented 1 year ago

Hey, that sound's like a really cool feature. I've to think about this a bit and hope to find some time for the implementation soon!

hrueger commented 1 year ago

Thanks!

pixelmund commented 1 year ago

This is now available from version 3.4.0, you'll have to opt in to the behaviour via chunked true on handleSession

export const handle = handleSession({
    chunked: true,
});
hrueger commented 1 year ago

Very cool, thanks 👍