These questions cover the 16 sections of the URL Fundamentals overview and are organized by topic clusters. No answers are provided — the goal is to test your understanding of URL concepts and their practical implications, not to memorize facts.
The questions mix conceptual understanding, scenario-based judgment, and common misconceptions.
urn:isbn:978-0-13-468599-1 is a URL." What's wrong with this statement?https://api.example.com:8080/users/search?role=admin&active=true#results, identify each of the five components and explain what each one tells the browser.https:// instead of http://? Name at least three things that HTTPS enables beyond encryption.http://localhost/app. The page doesn't load. What's wrong, and why is the port necessary in this case but not for https://example.com/app?https://shop.example.com/products?category=electronics&brand=sony&price_max=500. A user shares this link with a colleague. What will the colleague see, and why is this a good use of query parameters?https://example.com/blog/posts/article.html, resolve each of these relative URLs to their absolute form: other.html, ../about.html, /styles/main.css, ../../contact.html.<base href="https://cdn.example.com/assets/"> in their HTML. Now their <a href="#section2"> links navigate away from the current page. Explain why and how to fix it.//) considered an outdated pattern? What problem were they originally designed to solve?'/search?q=' + userInput. If the user searches for "cats & dogs", what goes wrong? What's the correct approach?encodeURI() and encodeURIComponent(). When would using the wrong one cause a bug? Give a concrete example./dashboard?token=abc123. List at least four ways this token could be leaked, and suggest a better approach.history.pushState() and history.replaceState(). When would you use each one?/login?redirect=/dashboard. An attacker changes this to /login?redirect=https://evil.com. What attack is this, and how should the application defend against it?/cgi-bin/display.pl?id=42 vs. /articles/42. Which is better and why? What happens when the company migrates from Perl to Python?/p/RS-42X?ref=nav vs. /products/running-shoes./blog/posts/my-article.php to /blog/my-article. What HTTP status code should the old URL return, and why? What happens to search engine rankings and existing bookmarks if this is handled correctly vs. incorrectly?