Do javascript variables have a storage limit?

前端 未结 4 1504
-上瘾入骨i
-上瘾入骨i 2020-12-31 06:10

Do javascript variables have a storage capacity limit?

I\'m designing one YUI datatable where I fetch the data from database and store it in a js object and wherever

4条回答
  •  离开以前
    2020-12-31 07:03

    There isn't such a limit.

    It looks that there is a limit at 16GB, but you can read some tests below or in @ssube's answer.

    But probably when your object/json is around 50 mb you'll encounter strange behaviour.

    For Json here is an interesting article : http://josh.zeigler.us/technology/web-development/how-big-is-too-big-for-json/

    For Js Object you have more knowledge here: javascript object max size limit (saying that there isn't such a limit but encounter strange behaviour at ~40 mb)

提交回复
热议问题