What parts of URL address do you know and what are they good for?

Experience Level: Junior
Tags: HTTP protocolQuality Assurance (QA)

Answer

As an example let's take the following URL:

https://www.bettercoder.io/JobInterviewQuestions/?q=My+query&a=112#lng=en-US

  • Protocol - https (the part before ://)
    • Thanks to protocol the HTTP client (browser) and the server know how to communicate, whether to use encrypted data transport or not
  • Domain/Subdomain - www.bettercoder.io (the first part after ://)
    • Thanks to the domain the HTTP client (browser) knows to which server it should connect.
  • Path - /JobInterviewQuesions/ (the part between :// and ?)
    • Thanks to the path the HTTP client (browser) knows what resource (web page) to ask for on the server 
  • Query string - ?q=My+query&a=112 (the part between ? and #)
    • Query string gives the developer option to pass additional parameters in the URL (for example for filtering purposes)
  • Hash portion - #lng=en-US (the part after #)
    • Hash portion is used to navigate to the specific anchor in browser. It can also be used by front-end applications to route between pages.
Related Quality Assurance (QA) job interview questions

Comments

No Comments Yet.
Be the first to tell us what you think.
HTTP protocol for beginners
HTTP protocol for beginners

Are you learning Quality Assurance (QA) ? Try our test we designed to help you progress faster.

Test yourself

Chat

Oh, the operator is not available. Leave us your comments. We will answer all your questions as soon as possible.

Comments

Anonymous
Καλησπέρα.
Anonymous
the infinteis -3/15 so 1triition / infinet
Anonymous
e
Anonymous
<a href="https://inspirum.pl "
Anonymous
[url]https://inspirum.pl[/url]
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e
LaceJaguar65
e