• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ajax Size Limit

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a java application that is a reporting engine. I am using ajax to go from a servlet and display on a page. On large tables, data gets dropped. If I don't use ajax, all data is displayed. I am using prototype.js. Is there a size limit to ajax? Any information would be greatly appreciated.
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there a size limit to ajax?



didn't get what size you're talking.. Ajax is just a technique.
 
James Daniel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe I should have been more specific. Does the XMLHttpRequest object have a size limit? When I printout driectly to a page, I am able to see the full result set. When I utilize the XMLHttpRequest via Ajax, part of the result set it cut off. I am using a post so I thought there was no limit but something is occurring either a limit or transmission timeout. I think it is a setting more than a timeout because it invariably gets cut off in the exact same place. A timeout would vary due to conditions.
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by James Daniel:
Maybe I should have been more specific. Does the XMLHttpRequest object have a size limit? When I printout driectly to a page, I am able to see the full result set. When I utilize the XMLHttpRequest via Ajax, part of the result set it cut off. I am using a post so I thought there was no limit but something is occurring either a limit or transmission timeout. I think it is a setting more than a timeout because it invariably gets cut off in the exact same place. A timeout would vary due to conditions.



Just a tip: to eliminate other possibilities, you can check on the server if the data indeed was sent back to the client, eg. display number of records processed in/for the jsp.
 
Jesus Angeles
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, try if it is an IE issue, by trying it on firefox.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the response in Fiddler and see what is up.

http://www.fiddlertool.com/fiddler/

Eric
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do know AJAX allow POST for xmlHttp.open() part. If you use GET there is like a limit like 255 or something like that just like any queries using GET.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by K. Tsang:
You do know AJAX allow POST for xmlHttp.open() part. If you use GET there is like a limit like 255 or something like that just like any queries using GET.



The question was about the response coming back, not the limit of characters allowed in a URL.

Eric
 
James Daniel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to thank all for your responses. I sincerely appreciate the input.

I am going to try it on Firefox today. I didn't think it was a browser issue because if I don't use the XMLHttpRequest object via Ajax and only printout to the screen, the full result set is displayed. I am using the post method on both the Ajax call and simple printout but for some reason, the XMLHttpRequest returns only a subset of data.

When this issue is resolved, I will let everyone know the result. ..even if it is user error. =)
 
James Daniel
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To Mingkai Yu,

I tried responding to your private message but it says you aren't accepting them.

One thing I did in my case was return a delimited string representing a resultset instead of formatted html. I format the delim string on the page via JavaScript. But the result was the same so it isn't the amount of physical data that Ajax is receiving. I am still trying to figure out what is happening. I believe it to be related to the div tag in which I am posting the data from Ajax. Hope that helps and let me know if you find anything..
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you look at the data in a program such as Fiddler as I suggested? Is the full content coming back in the response? Are you setting a content length on the response coming back?

Eric
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I was also facing the same problem that if the data being sent to the client exceeds certain limits then the data comes scrambled.
I used the fiddler tool to analyze the problem what I could see is after some limit (for me it was 8000 chars in responseText) the problem starts. Within that limit things work fine. I cant say that data is cut off because in fiddler I could not see the data what has been sent, it is some different irrevelant text.
It would be great help if somebody can solve this problem.
 
Goodbye moon men. Hello tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic