This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

TypeError: 'key' called on an object that does not implement interface Storage

  • 2 majibu
  • 1 ana tatizo hili
  • 1 view
  • Last reply by jkbjj

more options

Hi there,

The code below works fine on chrome, on Firefox I am getting the above error (TypeError: 'key' called on an object that does not implement interface Storage). Same bug described here: https://stackoverflow.com/questions/44176164/session-storage-error-on-firefox-only

//Code follows //-------------------------------------------------- $.ajax({ type: "POST", url: url, data: { Data: localStorage } }); //-------------------------------------------------- // Code end

Is this considered a bug? I really don't want to write different code for multiple browsers or adjusting it because of a bug....

Hi there, The code below works fine on chrome, on Firefox I am getting the above error (TypeError: 'key' called on an object that does not implement interface Storage). Same bug described here: https://stackoverflow.com/questions/44176164/session-storage-error-on-firefox-only //Code follows //-------------------------------------------------- $.ajax({ type: "POST", url: url, data: { Data: localStorage } }); //-------------------------------------------------- // Code end Is this considered a bug? I really don't want to write different code for multiple browsers or adjusting it because of a bug....

All Replies (2)

more options

Is this only a problem when jQuery is converting the object to key:value pairs, or is your script unable to access localStorage in other ways as well?

https://developer.mozilla.org/docs/Web/API/Storage

more options

FYI: JSON.parse(JSON.stringify(localStorage)) seems t have fixed the issue... athough I think this shouldn't be necessary