By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

GET is not working for large amout of data.

100+
P: 110
i had used get method in ajax but since get has limitations it has stopped working so shifted to post emthod evrythng working fie now bt
is there issue of IE caching when post method is used the way it has for GET method
Jul 6 '08 #1
Share this Question
Share on Google+
10 Replies


hsriat
Expert 100+
P: 1,654
Use a random get parameter with the url. The will make sure different request is sent every time.

Expand|Select|Wrap|Line Numbers
  1. var uri = url + '&rand=' + Math.random();
Jul 6 '08 #2

rnd me
Expert 100+
P: 427
you might try looking into other things, because POSTs are not supposed to be cached.
Jul 7 '08 #3

100+
P: 110
you might try looking into other things, because POSTs are not supposed to be cached.
I can't get method ehere since there is lot of data so i used post and and it is working perfectly only i wanted to know if there will be caching issues with post method too
Jul 7 '08 #4

rnd me
Expert 100+
P: 427
switching from get to post, along with the answer in post #2, are ways to defeat the caching of ajax requests.
Jul 7 '08 #5

100+
P: 110
but i'm using apache server will post create any problem for this
i'm getting error on line document.formname.submit();
invalid syntax
i tried putting window too but no use
Jul 7 '08 #6

hsriat
Expert 100+
P: 1,654
but i'm using apache server will post create any problem for this
i'm getting error on line document.formname.submit();
invalid syntax
i tried putting window too but no use
That's got nothing to do with Apache or Windows.
What error is it giving?
Jul 7 '08 #7

100+
P: 110
i tried putting
WINDOW.DOCUMENT.FORMNAME.SUBMIT();
and also
DOCUMENT.FORMNAME.SUBMIT();

but it gives me error of javascript invalid syntax
for the above line
i was using get method and it was working perfectly but only since late there were around 8 rows dyanamically created by ajax and so data exceed the limit for get method so i shifted for POST method now when i use this program locally it works fine but it doesnt work on live server i read somewhere apache does not work with post.
Jul 7 '08 #8

rnd me
Expert 100+
P: 427
try document.forms['formName'].submit()

post will work fine for large data sets.
get is limited to 2-4kb, post is unlimited.
Jul 7 '08 #9

100+
P: 110
there is no error but it doesnt submit the form
Jul 7 '08 #10

acoder
Expert Mod 15k+
P: 16,027
Post your code then. It'd be difficult to say what the problem might be without seeing the code.
Jul 7 '08 #11

Post your reply

Sign in to post your reply or Sign up for a free account.