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!
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...
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.
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 ?
All request made to your web server consumes bandwidth, otherwise you may want to use memcache for better performance.