What is the role of a cookie in maintaining sessions? MCQ with Answer and Explanation

What is the role of a cookie in maintaining sessions?
A. To authenticate the user directly
B. To encrypt session data
C. To store user data on the server
D. To store a session identifier on the client
Answer: Option D
Solution (By JKSSB Mock Tests)
Cookies often contain a session ID that is sent to the server with each request, allowing the server to associate the request with a specific user session.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Internet and Web Technologies Questions

Question #1
Which of the following is a common technique to reduce the size of web resources for faster loading?
A. All of the above
B. Minification
C. Compression (Gzip)
D. Image optimization

Correct Answer: Option A


Explanation:
Minification, compression, and image optimization are all effective methods to reduce resource size and improve load times.

This question belongs to: Computer Internet and Web Technologies
Question #2
What is the primary security benefit provided by an 'HTTPS' connection over standard unencrypted 'HTTP' communication?
A. It dramatically boosts physical data transmission speeds over fiber lines.
B. It encrypts data in transit to prevent eavesdropping and data tampering by third parties.
C. It completely prevents malware from downloading automatically to local hard drives.
D. It eliminates all forms of comment spam on web blogs.

Correct Answer: Option B


Explanation:
HTTPS ensures confidentiality and data integrity by encrypting the communication stream between a client and a web server using TLS/SSL.

This question belongs to: Computer Internet and Web Technologies
Question #3
What is the purpose of the 'User-Agent' header in HTTP requests?
A. To authenticate the user
B. To specify the preferred language
C. To identify the client software making the request
D. To provide the user's IP address

Correct Answer: Option C


Explanation:
The User-Agent header allows the server to identify the type of browser, operating system, and version, enabling content adaptation.

This question belongs to: Computer Internet and Web Technologies