What Is Common Gateway Interface?


The Common Gateway Interface (CGI) is the World Wide Web Consortium's (W3C) set of standards and protocols that define an interface between a web (HTTP) server and the programs it executes. CGI allows web servers to communicate with external databases and other data sources.

The programs that take advantage of CGI are called CGI scripts, and they are dominantly used to process web page user requests. CGI scripts can be designed in a programming language such as C or Perl, or written using shell scripting. They are well-documented, responsive, and compatible with all modern browsers.