Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

326
Views
QuotaExceededError when saving images in localStorage

I'm trying to figure out a way to cache images in browser memory. I tried saving their base64 representation in local storage as follows:

fr.readAsDataURL(blob)
fr.onloadend = () => {
   const base64 = fr.result
   localStorage.setItem(today.toDateString(), base64)
}

However, I'm getting the following error:

QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'Wed Sep 29 2021' exceeded the quota.

How can I accomplish this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The most you can use in localStorage is 5mb, which honestly if your images are that size it's going to be a bad user experience.

You should let the browser cache automatically where it needs to, especially for media content they're really clever at that already.

Base64 I can see being a problem, is there a reason you can't provide a URL instead?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!