Programs FSD-1
Programs FSD-1
❖ The search feature uses AJAX to fetch and display data without a page refresh.
❖ The server responds with JSON data, which is processed by JavaScript to update the page
content dynamically.
❖ It enforces rules that HTML does not, such as requiring all tags to be properly closed
and nested.
❖ A request sent from the client (usually a web browser) to the server to retrieve or
send data.
Components:
1. Method: Determines the action (GET, POST, etc.).
2. URL: Specifies the resource.
3. Headers: Includes metadata (e.g., Accept, Content-Type).
4. Body: Data sent with the request (e.g., form data for POST requests).
Example:
GET /page.html HTTP/1.1
Host: www.example.com
Accept: application/xhtml+xml
2. HTTP Response:
❖ The server's reply to the client's request, containing the requested resource or an
error message.
Components:
1. Status Code: Indicates the result (e.g., 200 OK, 404 Not Found).
2. Headers: Metadata about the response (e.g., Content-Type).
3. Body: The content (e.g., XHTML document).
Example:
HTTP/1.1 200 OK
Content-Type: application/xhtml+xml
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Example Page</title></head>
<body><h1>Hello, world!</h1></body>
</html>
❖ XHTML must adhere to XML syntax rules.
❖ HTTP requests and responses are the same for XHTML as for HTML but ensure XHTML