WWW Basics & Cookies MCQs: 12 Solved Questions with Explanations

Solve 12 WWW basics and cookies MCQs with explanations that separate URLs, browsers, client-side cookies, server-side sessions and TCP byte streams.

KnowledgeGate Team

Exam prep & CS education

Updated 10 Nov 20268 min read
WWW Basics & Cookies MCQs: 12 Solved Questions with Explanations

URL, browser, cookie and session questions look elementary, but their distractors blur four different things: a resource's location, the software that opens it, data stored by the browser, and session state held by a server. Past exam papers include questions on resource locations, browsers, cookies and sessions. Choose an option before reading each explanation, and keep a one-line reason for every answer. For more practice on the same topic, work through the WWW Basics & Cookies PYQ Questions question bank.

WWW basics and cookies: the 90-second concept map

A URL identifies a resource and indicates how to access it. A browser is client software that requests and renders web resources. An HTTP cookie is a small name-value data item managed by the user agent. A session is the continuity an application builds across otherwise separate HTTP requests.

Take this URL:

https://www.knowledgegate.ai/blog/computer-networks-mcqs?mode=practice#cookies

Here, https is the scheme, www.knowledgegate.ai is the host, /blog/computer-networks-mcqs is the path, mode=practice is the query, and cookies is the fragment. The host can resolve through DNS, so a URL need not contain a literal IP address.

Now suppose the server responds with:

Set-Cookie: session_id=KG42; Path=/; Max-Age=900; HttpOnly; Secure; SameSite=Lax

On the next matching request, the browser can send Cookie: session_id=KG42. Since 900 / 60 = 15, the maximum age is 15 minutes. The browser stores and returns the cookie under its matching and security rules. Separately, the server may map KG42 to a session record such as user_id=271. The identifier is client-side data; the application state it refers to may be server-side for later requests.

URL MCQs 1-4: locator, scheme and resource address

Question 1 (TPSC 2025)

Which of the following is true about a URL?

  • A. It is a Uniform Resource Locator

  • B. It is used to identify the source code of a website

  • C. It points to a specific IP address on the internet

  • D. It is a standard format for storing files on a server

Correct answer: A. It is a Uniform Resource Locator.

URL expands to Uniform Resource Locator. It identifies a resource through components such as scheme, host and path. It does not identify source code, require a literal IP address or specify a file-storage format. Review the solved question.

Question 2 (UP Police 2013)

The first part of a complete URL is the ________ needed to access the web resource.

  • A. address

  • B. name

  • C. location

  • D. protocol

Correct answer: D. protocol.

The first part is the scheme, such as https. Introductory questions call it the access protocol. Host and path information come later, so the other options do not fit. Review the solved question.

Question 3 (DSSSB 2021)

_____ gives the location of a resource on the internet.

  • A. URL

  • B. TCP/IP

  • C. Domain name

  • D. IP address

Correct answer: A. URL.

A URL can include the scheme, host, path and query for a particular resource. A domain name or IP address identifies a host or interface, while TCP/IP is a protocol suite.

Question 4 (EMRS 2023)

What does “URL” stand for?

  • A. Universal Resource Link

  • B. Uniform Resource Locator

  • C. Universal Reference Locator

  • D. Unified Resource Link

Correct answer: B. Uniform Resource Locator.

The three exact words are Uniform, Resource and Locator. The distractors substitute plausible terms such as Universal, Reference and Link. Review the solved question.

Question 5

Which one of the following statements is NOT correct about HTTP cookies?

  • A. A cookie is a piece of code that has the potential to compromise the security of an Internet user

  • B. A cookie gains entry to the user's work area through an HTTP header

  • C. A cookie has an expiry date and time

  • D. Cookies can be used to track the browsing pattern of a user at a particular site

Correct answer: A. A cookie is a piece of code that has the potential to compromise the security of an Internet user.

A cookie is data, not executable code. A server sends it through Set-Cookie, and the browser can return it through Cookie; sites use cookies for state and tracking. One nuance: option C is slightly too absolute, because a session cookie may omit Expires and Max-Age. The decisive distinction is still data versus code.

Question 6

The cookies of an HTTP client are stored on which side of the system?

  • A. Client-side

  • B. Server-side

  • C. Both side

  • D. No cookie stored

Correct answer: A. Client-side.

The browser stores the cookie on the client side. It holds session_id=KG42, while the server may separately store KG42 -> user_id=271. Referring to server-side state does not make the cookie server-side.

Questions 3, 5 and 6 do not have verified question-specific pages. Use the WWW Basics & Cookies PYQ Questions hub for their follow-up practice.

Question 7 (EMRS 2023)

Identify the term from the given options which is a small file or data packet, stored by a website on the client’s computer and used by the websites to store browsing information of the user.

  • A. Firewall

  • B. Cookies

  • C. Spyware

  • D. Trojan

Correct answer: B. Cookies.

The clues are small data, client storage and site-related state. A firewall filters traffic; spyware and Trojans are malware, not HTTP state mechanisms. Review the solved question.

Session MCQs 8-9: timeout and continuity

Question 8 (RSSB 2023)

Anuj is trying to transfer money to an agency from his bank. On trying multiple times, connection to the bank failed. Because of the financial transactions, certain cookies help to terminate the session when there is a time-out. These cookies are known as _____ cookies.

  • A. e-commerce

  • B. Session

  • C. Authentication

  • D. e-banking

Correct answer: B. Session.

A session cookie carries an identifier used during a session. Inactivity timeout is normally enforced server-side. session_id=KG42 has Max-Age=900, or 15 minutes, but a banking system can impose stricter server-side expiry. Cookie lifetime alone does not decide session validity. Review the solved question.

Question 9 (UGC NET 2022, Paper 2 December)

Which one of the following allows the session to continue?

  • A. When a user quits a browser

  • B. When the user logs out and is invalidated by the servlet

  • C. When the session is timed out due to inactivity

  • D. When the user refreshes the browser and there is a persistent cookie

Correct answer: D. When the user refreshes the browser and there is a persistent cookie.

Logging out, invalidation and inactivity timeout end the usable session. A refresh preserves browser state, and a persistent cookie remains available until expiry. The server must still accept its identifier, so persistence cannot override invalidation. Review the solved question.

Browser MCQs 10-11: software versus operating system

Question 10 (EMRS 2023)

Which of the following is a web browser?

  • A. Acrobat Reader

  • B. Microsoft Excel

  • C. Adobe Photoshop

  • D. Mozilla Firefox

Correct answer: D. Mozilla Firefox.

Firefox retrieves and renders web resources. Acrobat Reader handles PDFs, Excel handles spreadsheets, and Photoshop edits images. Review the solved question.

Question 11 (EMRS 2023)

Which of the following is not an example of a web browser?

  • A. Edge

  • B. Firefox

  • C. Android

  • D. Opera

Correct answer: C. Android.

Edge, Firefox and Opera are browsers. Android is an operating system that runs browser clients; it is not itself a browser. Review the solved question.

Application-to-TCP MCQ 12: data size versus segment size

Question 12 (ISRO 2016)

Worked TCP segmentation trace for 100,000 bytes into 68 full payloads and one 720-byte payload.

What is the maximum size of data that the application layer can pass on to the TCP layer below?

  • A. Any size

  • B. 2^16 bytes - size of TCP header

  • C. 2^16 bytes

  • D. 1500

Correct answer: A. Any size.

TCP provides a byte stream, so an application write is not limited to one packet or frame. For 100,000 bytes and an MSS of 1,460 bytes, 1,460 x 68 = 99,280, then 100,000 - 99,280 = 720. TCP can form 68 full payloads plus one 720-byte payload, or 69 segments in this simplified calculation. Ignoring offload and options, this shows why 1500 is an Ethernet MTU distractor and 2^16 is not an application-write ceiling. Review the solved question.

Area

Questions

Diagnostic focus

URL structure

1-4

Locator, scheme, host and exact expansion

Cookie meaning and storage

5-7

Data rather than code, client-side storage and purpose

Session continuity

8-9

Cookie persistence versus server-side validity

Browser identification

10-11

Browser client versus other software or an operating system

Application-to-TCP service

12

Byte stream versus segment and frame sizes

Use each miss to choose the repair:

  • Missed Questions 1-4: label the scheme, host, path, query and fragment on a fresh URL.

  • Missed Questions 5-9: trace Set-Cookie, Cookie, the server-side lookup and invalidation in order.

  • Missed Questions 10-11: classify each option as a browser, operating system or application.

  • Missed Question 12: separate application-write size, TCP segment payload and Ethernet MTU.

The recurring traps are category errors: URL versus host, cookie versus code or session, browser versus operating system, and application write versus frame size. If URL and cookie state are clear but DNS resolution and HTTP messaging are not, use the Application Layer Protocols: DNS and HTTP Guide. For a mixed DNS, HTTP and email question set instead of a URL-cookie drill, continue with Application Layer MCQs: 12 Solved DNS, HTTP, Email.

WWW basics and cookies: the short version and next step

  • URL means Uniform Resource Locator.

  • The scheme comes first in a complete URL.

  • A cookie is client-managed data.

  • Server-side session validity still decides whether an identifier works.

  • TCP segments an application byte stream.

Without looking back, write a four-line HTTP trace: URL request, Set-Cookie response, Cookie request and server-side session check. Then explain why an application write is not limited by MSS or MTU. Use GATE Guidance by Sanchit Sir for the Computer Networks syllabus; use the concept map and missed-question table above when you only need topic repair.