0

I get truncated responses on the client side while transferring back a javascript array (literal) to the client. I was wondering if there is a size limit for the response. Suggestions on how to handle this problem are very welcome.

On the client side I evaluate the response:

var r = eval(response.firstChild.firstChild.nodeValue); 

on the server side an array is sent back :

Error: unterminated string literal Source File: Line: 144, Column: 3530 Source Code: [['f1','13/03/2012 12:55:18','4543634952F01129AD7D0414855DBC52', ['2006','mir','note','pachet','pdf']], ['f10','13/03/2012 12:55:18','turnbull-taggin_music_sound-aslp2008', ['autotagging','missing','note','pdf']], ... ['f35','13/03/2012 12:55:18','ECML2001',['2001','note','pdf','syno 
5
  • 2
    no size limits that i know of, just time to process the request and return the value, paste some of your code plz. Commented Mar 13, 2012 at 12:49
  • I updated the question to better explain. The error is on the client, the array is send by the server. Commented Mar 13, 2012 at 13:00
  • Use a debugger such as Firebug to see the whole response prior to processing. See what you get. Commented Mar 13, 2012 at 13:44
  • what about your client side code? there's nothing wrong with your server side code Commented Mar 13, 2012 at 17:56
  • The server just send an array that is evaluated on the client side. As the response is truncated, I get an error. I am still investigating the problem. I found the response was truncated after 4096 characters. Does it ring a bell ? Commented Mar 14, 2012 at 10:54

1 Answer 1

1

I can answer my own question. The problem is browser-specific and due to a limitation in Firefox. In short, Firefox limits the size of XML nodes to 4k and splits the original value over multiple child nodes.

Mode details here : http://www.coderholic.com/firefox-4k-xml-node-limit/.

Sign up to request clarification or add additional context in comments.

1 Comment

I can answer my own question Do not forget to mark it as answered.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.