Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8640635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:19:41+00:00 2026-06-12T11:19:41+00:00

How is storing values directly in Javascript arrays is different than from storing them

  • 0

How is storing values directly in Javascript arrays is different than from storing them in come client side alternative like LocalStorage or IndexDB.

Where the values get stored in either cases. And what are limits.

My use case is: to store very fast data (float values) coming from server somewhere and then read it from that middle source to render the points on a real time plot/graph. Does the frequency also makes a difference to the choice ?

Any sample code snippet will be of great use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:19:42+00:00Added an answer on June 12, 2026 at 11:19 am

    Obvious differences between localStorage and arrays are :

    • you can only store strings (no objects)
    • it’s persisted so that you’ll get your values back next time
    • as it writes on disk it’s a heavier operation
    • the available space is limited to avoid cluttering the user’s disk (“User agents should limit the total amount of space allowed for storage areas.[…] A mostly arbitrary limit of five megabytes per origin is recommended”)

    W3.org reference on localStorage

    You read and write in localStorage like this :

    var foo = localStorage["bar"];
    // ...
    localStorage["bar"] = foo;
    

    (example taken from the great introductory site http://diveintohtml5.info/storage.html)

    If you’re only using your data for the current session, don’t use localStorage. Use standard arrays (they’re fine and fast) or Float32Array.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a multiform application in c#. I'm storing the values from the user
SQLite docs specifies that the preferred format for storing datetime values in the DB
I'm considering storing some date values as ints. i.e 201003150900 Excepting the fact that
What are the typical arguments in support of storing combo-box values (static lookup values
I will be storing draw numbers (1-60) in fixed values and fixed order. One
I have an issue while storing some special character values into db. For e.g.
I was wondering what the best way is for storing and retrieving session values
I have a form I've built in PHP and storing the form field values
I have a String[] with values like so: public static final String[] VALUES =
I would like to upload from a web browser a text/html string as an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.