---
title: "AJAX features; CGI, Perl, JavaScript helpers"
subject: "Internet and Intranet"
chapter: 6
key: "semester_8/internet_and_intranet:ajax-features-cgi-perl-js"
source: https://www.bctengineer.com/q/semester_8/internet_and_intranet/ajax-features-cgi-perl-js
site: BCT Engineering
---

# AJAX features; CGI, Perl, JavaScript helpers

Internet and Intranet · Chapter 6: Internet and Intranet Systems Development

- Asked in: 2070 Magh, 4+7 marks
- Video: [Learn Ajax in 15 mins with examples](https://www.youtube.com/watch?v=5MmEUWfuZFk) — Programming with Vishal
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/internet_and_intranet/ajax-features-cgi-perl-js
- Whole chapter: https://www.bctengineer.com/md/semester_8/internet_and_intranet/chapter-6

## Question

What are the features of AJAX programming? How the helper applications like CGI, PERL, and JAVA Scripts help to develop better internet and intranet system? Explain.

## Short answer

AJAX features asynchronous background data exchange, partial page updates via DOM, reduced data transfer, and a responsive desktop-like interface. CGI enables server-side dynamic content generation; Perl excels in text processing and form handling for CGI scripts; JavaScript provides client-side validation, DOM manipulation, and the XMLHttpRequest foundation for AJAX, together creating efficient interactive systems.

## Answer

#### Features of AJAX programming

**AJAX (Asynchronous JavaScript and XML)** is a group of techniques for building interactive web pages that exchange data with the server in the background.

- **Asynchronous requests:** the page sends a request using `XMLHttpRequest` (or `fetch`) and keeps running without freezing.
- **Partial page update:** only the changed part of the page is refreshed using the DOM, so there is no full reload.
- **Less data transfer:** only the needed data (XML or JSON) is sent, saving bandwidth.
- **Better user experience:** quick response, live validation, auto-complete.
- **Standards-based:** uses HTML/XHTML, CSS, DOM, JavaScript and XML/JSON; no plug-in is required.
- **Platform and server independent:** the server can be PHP, JSP, ASP or CGI.
- **Event driven:** server responses are handled by callback functions.

#### Role of CGI, Perl and JavaScript

**CGI** lets the web server run programs on request. It processes forms, queries databases, builds pages dynamically and handles features such as counters, search and e-commerce orders. It turns static websites into interactive internet and intranet systems and works with any language.

**Perl** was historically the most popular language for CGI scripts.
- Strong text and pattern matching, so it is excellent for form processing and report generation.
- The `CGI.pm` and `DBI` modules simplify form handling and database access.
- Free and available on all platforms, with many ready-made scripts.
- Used for system administration scripts on intranets.

**JavaScript** is a client-side scripting language that runs in the browser.
- Validates form input before sending, which reduces load on the server and network.
- Gives dynamic effects (menus, calculations, dialogs) by controlling the DOM.
- Makes AJAX possible by sending background requests.
- Works with cookies and browser features, giving a quicker interface.

**Together:** JavaScript handles the user interface on the client, CGI/Perl does the server work (security checks, database, mail), and data moves between them over HTTP. This split reduces server load, speeds up response and makes applications richer and cheaper to develop.

```text
 Browser (HTML + JavaScript) --HTTP--> Web server
        validation, DOM                  runs CGI (Perl)
        <---------- result ------------  database / mail
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does the asynchronous feature of AJAX mean?
   A. The page freezes until the server replies
   B. The page sends a request with XMLHttpRequest or fetch and keeps running while waiting
   C. The server sends data without a request
   D. All data is sent in one large page
   Answer: B. The page continues to work while the background request is processed. (Key point: Asynchronous requests)

2. How does AJAX update a page after the response arrives?
   A. A full reload of the page
   B. A callback function changes only the needed part using the DOM
   C. The server rewrites the browser's cache
   D. The user must refresh manually
   Answer: B. Event-driven callbacks update only the changed part of the page through the DOM. (Key point: Partial update)

3. Why is Perl widely used for CGI scripts?
   A. It is the only language CGI supports
   B. Strong text and pattern matching, modules such as CGI.pm and DBI, and free availability
   C. It runs inside the browser
   D. It draws page layouts
   Answer: B. Perl is good at form processing and report generation, with modules for forms and databases. CGI itself works with any language. (Key point: Role of Perl in CGI)

4. How is the work divided between JavaScript and CGI/Perl?
   A. JavaScript runs on the server for database access; CGI runs in the browser
   B. JavaScript handles the client interface and validation; CGI/Perl does server work such as security checks, database and mail
   C. Both run only on the client
   D. CGI handles colours; JavaScript handles mail
   Answer: B. Client-side validation lowers server load, while the server does the secure processing. (Key point: Division of work)

## Related in Internet and Intranet

- [CGI working; JSP vs ASP; AJAX](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Acgi-jsp-asp-ajax) — Internet and Intranet, chapter 6
- [XML and JavaScript for client-side web apps](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Axml-javascript-client-side) — Internet and Intranet, chapter 6
- [Internet vs Intranet and DNS need](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Ainternet-intranet-compare-dns) — Internet and Intranet, chapter 1
- [Intranet, Internet, Extranet comparison and resources](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aintranet-internet-extranet-compare) — Internet and Intranet, chapter 1
- [Intranet vs Internet, firewall, content filtering](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aintranet-internet-benefits-firewall) — Internet and Intranet, chapter 1
- [Intranet vs Internet and intranet protocols](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aintranet-vs-internet-protocols) — Internet and Intranet, chapter 1

## Related in other subjects

- [Two ways science can help society develop](https://www.bctengineer.com/question.md?key=semester_5%2Fcommunication_english%3Atwo-ways-science-help-society) — Communication English, chapter 2
- [Server-side programming and Java Servlet](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aserver-side-programming-servlet) — Web Technology, chapter 3
- [Internet, intranet and extranet use](https://www.bctengineer.com/question.md?key=semester_8%2Finformation_system%3Ainternet-intranet-extranet) — Information System, chapter 1
- [Short note: Internet / Intranet](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Ashort-note-internet-intranet) — Basic Electronics Engineering, chapter 5
