0% found this document useful (0 votes)
91 views6 pages

Lab01 Itt557

This document discusses HTTP protocols and headers. It provides instructions on using developer tools to view request and response headers for different URLs. It also covers HTTP status codes and categories. The objectives are to understand HTTP methods, headers, and status codes.

Uploaded by

fatin Humaira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views6 pages

Lab01 Itt557

This document discusses HTTP protocols and headers. It provides instructions on using developer tools to view request and response headers for different URLs. It also covers HTTP status codes and categories. The objectives are to understand HTTP methods, headers, and status codes.

Uploaded by

fatin Humaira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

LABORATORY 1

ITT 557
HTTP PROTOCOL

NAME: FATIN HUMAIRA BINTI MOHD FAIRUL NIZAM

STUDENT ID: 2 0 2 2 4 5 5 4 3 4
LAB OBJECTIVES
At the end of this laboratory session, students should be able to:
i. List and differentiate HTTP methods type.
ii. List and describe fields in request and response headers.
iii. List and explain different type of status codes.

INSTRUCTION

HTTP HEADERS

1. Launch Google Chrome and open the following URL:

http://ali.uitm.edu.my/ ild.uitm.edu.my
2. We are going to use the developer tools to see the HTTP headers. Enable the
developer tools panel.

3. Select the network tab and reload the page.

4. Click on the index page.

5. How many requests were made? 120

6. How many requests were successful? 108

7. What is the total time needed to completely load the page? 1.5s

8. Write down the Request headers


Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/sign
ed-exchange;v=b3;q=0.7 Accept-Encoding:
gzip, deflate, br, zstd
Accept-Language:
en-GB,en;q=0.9,en-US;q=0.8,ms;q=0.7,ko;q=0.6,fil;q=0.5,id;q=0.4,el;q=0.3
Connection:
keep-alive
Cookie:
cookiesession1=678B2882E5E22AF5001DFFFCF0EFDA35;
bd1f0844a0e749c4bbe570be509eaa2b=a2dcb8b7901b0a66a73e6e5e30fe36f3
Dnt:
1
Host:
2 | Mohd Ali Mohd Isa © 2021
ild.uitm.edu.my
Referer:
https://ild.uitm.edu.my/
Sec-Ch-Ua:
"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Windows"
Sec-Fetch-Dest:
document
Sec-Fetch-Mode:
navigate
Sec-Fetch-Site:
same-origin
Sec-Fetch-User:
?1
Upgrade-Insecure-Requests:
1
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

9. List another 5 HTTP request headers NOT in the above headers


- Accept-Charset, Accept-Datetime, Access-Control-Request-Method, Authorization, Referer

10. Write down the Response headers


Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: Keep-Alive
Content-Length: 72051
Content-Security-Policy: upgrade-insecure-requests
Content-Type: text/html; charset=utf-8
Date: Fri, 05 Apr 2024 13:10:45 GMT
Expires: Wed, 17 Aug 2005 00:00:00 GMT
Keep-Alive: timeout=3, max=10
Last-Modified: Fri, 05 Apr 2024 13:10:45 GMT
Pragma: no-cache
Server: XXXXXXX
Strict-Transport-Security:
max-age=15552000
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block

11. List another 5 HTTP request response NOT in the above headers
Accept-Ranges, Age, ETag, Location and Proxy-Authenticate.

3 | Mohd Ali Mohd Isa © 2021


12. Click on style.css

13. What is the difference between the response header for the index page and
style.css?

Content-Type: text/css

4 | Mohd Ali Mohd Isa © 2021


14. Reload the page. Explain why it is faster to completely load the page the second time
even if the number of requests is the same. Justify your answer.
Because the page contents are saved in cache.

15. On the webpage, click on the tab About Me. Is the request header difference? List
down the differences. Yes
Cache-Control
Referer: page id

16. Open the following URL:

https://ali.uitm.edu.my/?p=126

17. Enter any password into the password field and submit. Notice the resulting request
headers.

18. What is the difference between the request headers in Q17 and the request headers
in Q15?
Content-Type: application/x-www-form-urlencoded only exist in q17 header.

STATUS CODES

19. Open the following URL:

https://ali.uitm.edu.my/?p=99999

20. What is the status code when accessing the above URL? 404 not found

21. List down at least 3 categories of status codes.


Client error responses, server error responses, informational responses

22. List down at least 3 status codes for each category listed in Q21.
Client error responses – 400(bad requests)
Server error responses – 502(Bad Gateway)
Informational responses – 101(switching protocols)

BONUS

23. Other than using browsers such as Mozilla Firefox and Google Chrome, we can also
use command or programming libraries for HTTP Protocols. If you have time, try
out the following two commands:

5 | Mohd Ali Mohd Isa © 2021


curl --head example.com.

wget --server-response --spider example.com

6 | Mohd Ali Mohd Isa © 2021

You might also like