Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

localStorage reach maximum size while there are only 800 Kb data in it.

  • 1 antwurd
  • 4 hawwe dit probleem
  • 114 werjeftes
  • Lêste antwurd fan mileskunta

more options

I met an localStorage exception when I call API "localStorage.setItem()"

we are developing a web site, we used host like aaaa.bb.com the case is :
the local storage has about 560KB Data in localstorage and then I want to set an item into localStorage, the size of the new item is 301KB
then the browser throw exception, the content of the exception is as follows:

The way I used to test the size of localStorage is: JSON.stringify(localStorage).length

"Persistent Storage maximum size reached" code:"1014" nsresult: "0x80530f6(NS_ERROR_DOM_QUOTA_REACHED)"

I tested this function in other machines and in chrome, this exception will not occur, I want to know why this exception occurs on the machine, if there is any settings in firefox? or if there is any relationship with the cache size?

I met an localStorage exception when I call API "localStorage.setItem()"<br> we are developing a web site, we used host like aaaa.bb.com the case is :<br> the local storage has about 560KB Data in localstorage and then I want to set an item into localStorage, the size of the new item is 301KB<br> then the browser throw exception, the content of the exception is as follows:<br> <br> The way I used to test the size of localStorage is: JSON.stringify(localStorage).length<br> <br> "Persistent Storage maximum size reached" code:"1014" nsresult: "0x80530f6(NS_ERROR_DOM_QUOTA_REACHED)"<br><br> I tested this function in other machines and in chrome, this exception will not occur, I want to know why this exception occurs on the machine, if there is any settings in firefox? or if there is any relationship with the cache size?

Keazen oplossing

the root cause is found.

the reason is that aaa.domain.com and bbb.domain.com, the two sub domain will share the same space of localStorage because they are under the same top level domain domain.com.

aaa.domain.com reach maximum size when there is only 500KB data in localStorage because there is already 4.5MB data in localStorage of bbb.domain.com.

Dit antwurd yn kontekst lêze 👍 4

Alle antwurden (1)

more options

Keazen oplossing

the root cause is found.

the reason is that aaa.domain.com and bbb.domain.com, the two sub domain will share the same space of localStorage because they are under the same top level domain domain.com.

aaa.domain.com reach maximum size when there is only 500KB data in localStorage because there is already 4.5MB data in localStorage of bbb.domain.com.