In
web development
Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web applications, ...
, a postback is the exchange of information between servers to report a user's action on a website, network, or app.
Technically speaking, a postback is an
HTTP POST
In computing, POST is a request method supported by HTTP used by the World Wide Web.
By design, the POST request method requests that a web server accepts the data enclosed in the body of the request message, most likely for storing it. It is o ...
to the same page that the
form
Form is the shape, visual appearance, or configuration of an object. In a wider sense, the form is the way something happens.
Form may also refer to:
*Form (document), a document (printed or electronic) with spaces in which to write or enter dat ...
is on. In other words, the contents of the form are ''POST''ed ''back'' to the same
URL
A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
as the form.
Postbacks are commonly seen in edit forms, where the user introduces information in a form and hits "save" or "submit", causing a postback. The server then refreshes the same page using the information it has just received.
Postbacks are most commonly discussed in relation to
JSF and
ASP or
ASP.NET
ASP.NET is a server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Ac ...
.
In ASP, a form and its POST action have to be created as two separate pages, resulting in the need for an intermediate page and a redirect if one simply wants to perform a postback. This problem was addressed in ASP.NET with the
__doPostBack()
function and an application model that allows a page to perform validation and processing on its own form data.
In JSF, postbacks trigger the full JSF life-cycle, which just like ASP.NET performs conversion and validation of the form data that was included in the postback. Various utility methods are present in the JSF API to programmatically check if a given request is a postback or not.
Postback types
* Postback for Affiliate Networks
* Postback for Traffic Flows
* Postback Macros
References
See also
*
Ajax (programming)
Ajax (also AJAX ; short for "asynchronous I/O, asynchronous JavaScript and XML") is a set of web development techniques that uses various web technologies on the client-side to create asynchronous web applications. With Ajax, web applications c ...
*
ASP.NET
ASP.NET is a server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stands for Ac ...
*
JavaServer Faces
Jakarta Faces, formerly Jakarta Server Faces and JavaServer Faces (JSF) is a Java specification for building component-based user interfaces for web applications. It was formalized as a standard through the Java Community Process as part of the ...
Web design
{{web-software-stub