Nepedia
Back to Discover
Fluent Reader
💻

Common Gateway Interface

technology Maturity 9-11 Next article →

Web pages can do much more than just show you static pictures or text. They can actually talk to you and respond to what you do. This magic happens through a tool called the Common Gateway Interface, or CGI. CGI acts like a bridge or a gateway between a web server and other computer systems. It allows a web server to run an external program to handle user requests. Without this, the web would be a much quieter place.

Common Gateway Interface logo
Common Gateway Interface logo

When you use a web page, the way it works follows a specific set of steps. First, you might fill out a form on a website and click a submit button. This action sends your data to the web server inside an HTTP request. The server then launches a CGI script as a new computer process. This script takes your data and does some work with it. Usually, the script creates a new page using HTML. Finally, the server sends that new page back to your browser as a response.

Common Gateway Interface logo
Common Gateway Interface logo

CGI was a very important invention in the early 1990s. It was the earliest common way to make web pages interactive. In 1993, a team from the National Center for Supercomputing Applications (NCSA) wrote the first specification. They shared this idea on a mailing list called www-talk. Other developers saw how useful it was and began using it. This helped make CGI a standard for web servers everywhere. Later, in November 1997, a group led by Ken Coar worked to make these rules even more formal.

Common Gateway Interface logo
Common Gateway Interface logo

Many important people helped shape how CGI works today. The formal rules, known as RFC 3875, included help from many experts. Rob McCool wrote the NCSA HTTPd server, and John Franks wrote the GN web server. Ari Luotonen worked on the CERN httpd server. Tony Sanders worked on the Plexus server, and George Phillips helped at the University of British Columbia. These people helped ensure that different web servers could all use the same language. This made it much easier for programmers to write scripts that worked on any server.

Common Gateway Interface logo
Common Gateway Interface logo

Even though CGI is old, it is still used in many places today. You can find it in well-known software like Apache and Microsoft IIS. However, CGI has a hard job because it must start a new process for every single request. This can use a lot of computer memory and power. Because of this, people created faster alternatives like FastCGI or SCGI. These newer ways allow programs to stay running instead of starting and stopping constantly. Just like how a bridge connects two lands, CGI connected the early web to the big databases of the past.

444 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Common Gateway Interface logo.svg
Common Gateway Interface logo.svg
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.