CGI stands for Common Gateway Interface and it literally provides a gateway for the Web browsers to communicate dynamically with the Web server. Under standard non-CGI setup, web pages that are visited by users can be viewed as static pages. This simply means that when users type in a particular web address on a browser for example, the corresponding browser will communicate with the server to get the requested page. This particular page is pre-written and the web browser will simply retrieve the corresponding file and give it to the web browser for display. Under CGI, web browsers will be able to give more information to the user other than display static pages. If a particular user for example types a certain text on a given field, the browser needs to have this text processed. This particular user input can only be processed through CGI. The page to be displayed to the user may be in a form of a confirmation for his/her action and this can only be possible for CGI-enabled web server and web page interface.
The use of CGI between web servers and web pages basically make the online experience of users become dynamic. Web pages aren’t’ displayed as static data but rather dynamically. Interactivity is added to pages in the form of fields for typing text or special commands for example which are interpreted and processed by an assigned program which can be stored on the web server. With user interactivity, pages are not pre-written in its entirety. Different responses or displays are needed for different commands and this can only be made possible with CGI. The best thing about CGI is that the dynamic component or programs needed to interpret user input can also be embedded on the page itself aside from storing it on the web server side. Using CGI scripts, mini-programs can be created to create dynamic web pages. CGI implementation can also be written in different programs because the gateway of information exchange remains consistent between the web server and webpage.