GATE CS 2015 Set 3 — Question 18
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MCQ+1 / -0.33MediumHTTP & HTTPSApplication LayerComputer Networks
Computer Networks → Application Layer → HTTP & HTTPS
Last updated
Question
In a web server, ten WebPages are stored with the URLs of the form http://www.yourname.com/var.html; where, is a different number from 1 to 10 for each Webpage. Suppose, the client stores the Webpage with (say W1) in local machine, edits and then tests. Rest of the WebPages remains on the web server. W1 contains several relative URLs of the form “var.html” referring to the other WebPages. Which one of the following statements needs to be added in W1, so that all the relative URLs in W1 refer to the appropriate WebPages on the web server?
Correct answer
(B) <base href: “http://www.yourname.com/”
Solution
When a webpage is saved locally, relative URLs (like "2.html") resolve relative to the local file path (e.g.,
file:///C:/Users/.../2.html). To make them resolve to the original web server location, the <base> tag must be used in the HTML head.The <base> tag specifies the base URL for all relative URLs in a document. By adding <base href="http://www.yourname.com/">, a relative link like "2.html" will be interpreted as "http://www.yourname.com/2.html", which correctly points to the server.Option (B) represents this tag (despite the non-standard colon syntax used in the question options, it is the only semantically correct choice for setting a base URL).Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Application Layer
2026 Set 1 Q18With respect to a TCP connection between a client and a server, which one of the following…2026 Set 1 Q19Which of the following statements is/are true with respect to the interaction of a web browser with…2026 Set 2 Q21Consider a file of size 4 million bytes being transferred between two hosts connected via a path…2026 Set 2 Q22Which one of the following protocols may need to broadcast some of its messages?2026 Set 2 Q33If an IP network uses a subnet mask of 255.255.240.0, the maximum number of IP addresses that can…