What is the difference between......

  • Thread starter Thread starter Angel Of Death
  • Start date Start date
A

Angel Of Death

A postback and a callback. Does a callback always avoid a page being
re-sent in it's entirety back to the client and does a post-back always
force a browser to reload an entire page? Is this my right
understanding? If so, why is it that people say that a callback is a
postback.
 
Hi,
A postback and a callback. Does a callback always avoid a page being
re-sent in it's entirety back to the client and does a post-back always
force a browser to reload an entire page? Is this my right
understanding? If so, why is it that people say that a callback is a
postback.

It's a question of definition. What people meant when they said that a
callback is a postback is that the callback mechanism use POST, as
opposed to GET. This is why the IsPostback attribute is true.

HTH,
Laurent
 
Hi...
Your question is very interesting...Mainly u wanna know the difference
between post back and call back...

Post Back:---
As u already know that in post back full page gets refreshed..Here
Browser sends a request to Web server...and Webserver fulfills the
request...

Call Back:---
Here also Browser sends a request to Web server and webserver fulfills
the request...Only thing is that Page wont get refreshed...Its a
backend process, which a user cant see. Concept of call back has been
implemented by microsoft in AJAX (Asynchronous JavaScript and
XML)....Generally what happens is that even if browser makes request
for a small part on web form or page, Web server used to refresh all
the things...Which leads to reduction in Bandwidth and congestion in
the network...and finally degrades the performance of web application(
makes it slow)...But in AJAX or concept of call back...If I need to
attach a file or upload a document, only that action will be performed,
whole page will not be refreshed..
Real Time examples is Gmail has implemented this...While u attach a
file(of any size), it gets attached immediately without refreshing the
page..But its not possible to to attach a file of 12 MB in 1 sec...We
think that file has attached, but it completes that process in back
end...or it may take time when u click on send button...so Call Back
method is fast bec whole page will not get refreshed...
I hope I have answered ur question clearly....
Regards
Raghav Mahajan
 
Angel said:
A postback and a callback. Does a callback always avoid a page being
re-sent in it's entirety back to the client and does a post-back always
force a browser to reload an entire page? Is this my right
understanding? If so, why is it that people say that a callback is a
postback.

A postback always refreshes the full page because it sends a request to
the server for that full page and then displays it in your browser.

A callback is just an http request made with the XmlHttpRequest object.
This lets a javascript method call the server and return the result to
the page *which is already in the browser* it doesn't have to refresh
anything (unless it wants to) it just makes a request and gets some
data back. The data you request from the server can be as large or
small as you like.

It's still a postback because you're still making a POST request and
sending data to the server, the only difference is the mechanism you're
using.
 
Back
Top