Common Gateway Interface


In computing, Common Gateway Interface (CGI) is an interface specification that enables web servers to execute an external program, typically to process user requests.[1]

Such programs are often written in a scripting language and are commonly referred to as CGI scripts, but they may include compiled programs.[2]

A typical use case occurs when a Web user submits a Web form on a web page that uses CGI. The form's data is sent to the Web server within an HTTP request with a URL denoting a CGI script. The Web server then launches the CGI script in a new computer process, passing the form data to it. The output of the CGI script, usually in the form of HTML, is returned by the script to the Web server, and the server relays it back to the browser as its response to the browser's request.[3]

Developed in the early 1990s, CGI was the earliest common method available that allowed a Web page to be interactive. Although still in use, CGI is relatively inefficient compared to newer technologies and has largely been replaced by them.[4]

  1. ^ Robinson <[email protected]>, David. "The Common Gateway Interface (CGI) Version 1.1". tools.ietf.org. Retrieved 16 February 2021.
  2. ^ Robinson <[email protected]>, David. "The Common Gateway Interface (CGI) Version 1.1". tools.ietf.org. Retrieved 16 February 2021.
  3. ^ RFC3875: The Common Gateway Interface (CGI) Version 1.1
  4. ^ Trieloff, Lars (5 January 2017). "2017: The Year of cgi-bin…er, Serverless". Medium. Retrieved 16 February 2021.

Powered by 654 easy search