/    Sign up×
Community /Pin to ProfileBookmark

How much can a client store ?

Hello

I am looking at writing a large JavaScript file but have a concern..

I would like to store a large amount of objects on the client side.

I will be sending XML and receiving XML via Ajax and would like to keep a history of every POST the user makes via Objects and Arrays.

If a user did over 100 request and i stored results in arrays and custom objects , would the client run into memory issues or anything else ?

Hope you can help

Drew

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@coppocksDec 23.2006 — The closest I have come with what you are talking about was along the lines of a chat application. Whereby a new request was made every 2 seconds. Now each time a new chat input was detected, a new table row & 2 or 3 cells (objects) was added to the table. I like doing things from scratch, that's how I learn... so here's what happened...

Initially, I added the cells with DOM and used innerHTML to add the cell content, which may or may not have added HTML as part of the innerHTML (ie, adding a <br> tag to a line break in the chat text). That DID cause memory issues with IE. So when I went all DOM and did away with the innerHTML and went to createTextNode, all memory leaks went away. During testing, we got up to several hundred rows with 3 columns each, with no issues.

You just cant add HTML tags as part of createTextNode() or the tag will display as part of the text, so I added code in the JavaScript to detect and add such things ... document.createElement("br") ... and append that to the cell etc.

Additionally, I did not use XML, but PHP returned a text string with each request, which was parsed and displayed accordingly. But the principle is the same. I had more than 100 requests, created multiple objects each time, appending those to existing objects. Core DOM, no issues. I used Drip and sIEve to check IE memory issues.

Maybe this is what you are talking about?
Copy linkTweet thisAlerts:
@shiv_gtmDec 23.2006 — i the similar way i want to know how i send a varible data from client system to server system when i submit the data to server. and how i also read client data in server
Copy linkTweet thisAlerts:
@cgishackauthorDec 23.2006 — shiv_gtm - Look into [B]Ajax [/B]and your favorite [B]server side[/B] language (i.e php )
Copy linkTweet thisAlerts:
@cgishackauthorDec 23.2006 — coppocks -

Thank you very much for the reply.

I will definitely consider all the suggestions you made.!

Drew
×

Success!

Help @cgishack spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...