GET is not working for large amout of data.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SSG001
    New Member
    • Oct 2007
    • 110

    GET is not working for large amout of data.

    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
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Use a random get parameter with the url. The will make sure different request is sent every time.

    Code:
    var uri = url + '&rand=' + Math.random();

    Comment

    • rnd me
      Recognized Expert Contributor
      • Jun 2007
      • 427

      #3
      you might try looking into other things, because POSTs are not supposed to be cached.

      Comment

      • SSG001
        New Member
        • Oct 2007
        • 110

        #4
        Originally posted by rnd me
        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

        Comment

        • rnd me
          Recognized Expert Contributor
          • Jun 2007
          • 427

          #5
          switching from get to post, along with the answer in post #2, are ways to defeat the caching of ajax requests.

          Comment

          • SSG001
            New Member
            • Oct 2007
            • 110

            #6
            but i'm using apache server will post create any problem for this
            i'm getting error on line document.formna me.submit();
            invalid syntax
            i tried putting window too but no use

            Comment

            • hsriat
              Recognized Expert Top Contributor
              • Jan 2008
              • 1653

              #7
              Originally posted by SSG001
              but i'm using apache server will post create any problem for this
              i'm getting error on line document.formna me.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?

              Comment

              • SSG001
                New Member
                • Oct 2007
                • 110

                #8
                i tried putting
                WINDOW.DOCUMENT .FORMNAME.SUBMI T();
                and also
                DOCUMENT.FORMNA ME.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.

                Comment

                • rnd me
                  Recognized Expert Contributor
                  • Jun 2007
                  • 427

                  #9
                  try document.forms['formName'].submit()

                  post will work fine for large data sets.
                  get is limited to 2-4kb, post is unlimited.

                  Comment

                  • SSG001
                    New Member
                    • Oct 2007
                    • 110

                    #10
                    there is no error but it doesnt submit the form

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      Post your code then. It'd be difficult to say what the problem might be without seeing the code.

                      Comment

                      Working...