The CGI or the Common Gateway Interface is another important technology that facilitates interaction between web servers and web applications/scripts. Whenever a user wishes to access a web page or a resource that requires processing on the server side, then the web server invokes a CGI program to gather data, analyze the request, or even generate a response. The basic workflow is: 1. This is a web application because the user enters a request through the browser for a specific page to be served. This request can be sent to the web server. 2. If the webpage needs additional data fetch from the database or an application, the web server forwards the request to the CGI program. 3. This particular request is then processed in the CGI program and can involve the task of getting data, executing applications and scripts, accessing and manipulating databases and other systems, or simply running a script. 4. When it has obtained the necessary data or the output, the CGI program forwards it to the web server. 5. This CGI output is then inserted into the web page content by the web server before the final page containing the combined content is returned to the user’s browser. Thus, in brief, CGI serves as an intermediary or go-between between web servers and all other applications and systems. It allows the server to respond with dynamic, user-specific content, without requiring any changes to the user’s browser. At present, CGI and related technologies are the cornerstones of today’s websites for their main and interactive features.
Compare CGI-Communication Internet and many other internet providers near your home: