does $.get consumned any bandthwidt?

Discussion in 'jQuery' started by spaceman12, Mar 21, 2011.

  1. #1
    Hello,
    I'm just too vague over my understanding as to what I know so far may be true or not. Suppose, I have a text file stored on the server.

    We all know that when a file stored on a server is opened for viewing, some bandwidth is consumned and the consumption increases with every refresh of the page and so on.

    So if i use $.get on the client browser to reteieve the contents of the text file stored on the server, will it affect the server bandwidth consumption? I just want to make it clear that it is just a plain text file.

    I'm looking for all posibilities as to how I can retrieve the contents of the text file stored on the server from the client browser without necesarily having to consumned any server bandwidth.

    thank you all in advance!
     
    spaceman12, Mar 21, 2011 IP
  2. Jan Novak

    Jan Novak Peon

    Messages:
    121
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    0
    #2
    It doesn't matter if you use GET or POST request via AJAX or directly from browser. Everytime the webserver serves the file. So webserver must find the file on the harddrive, check access privileges, send HTTP headers, send content of the file(bandwidth consumption) etc.
    Try to host the file on another webserver to avoid bandwith consumption on your current webserver...
     
    Jan Novak, Mar 22, 2011 IP
  3. yenerich

    yenerich Active Member

    Messages:
    697
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    75
    #3
    Everytime that a server send a file (html, images, etc) it consumes bandwith, it dosenta matters (makes no difference) if you get it using AJAX or whatever other method (directly browing to the file, etc).
    The size of the file is what determined the bandwith consume. Usually its not something important, unless you have really high traffic.
     
    yenerich, Mar 30, 2011 IP
  4. codeartist

    codeartist Peon

    Messages:
    96
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ajax calls are for consuming less bandwidth and display appropriate content at required place without refreshing pages so why you really care about the consuming bandwidth ?
     
    codeartist, Apr 2, 2011 IP
  5. BeerJacket

    BeerJacket Active Member

    Messages:
    202
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    53
    #5
    A text file, is your server on AOL dial up?
     
    BeerJacket, Apr 2, 2011 IP
  6. leunamer

    leunamer Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    All request made to your web server consumes bandwidth, otherwise you may want to use memcache for better performance.
     
    leunamer, Apr 3, 2011 IP