Chapterبەش 3 · Lectureوانە 3.2

URL, URI and URNURL، URI و URN

What the letters of URL, URI and URN mean and how the three are related; URIs that are not web pages (mailto:, tel:, sms:, urn:); the parts of a URI; a link vs a URL; and percent-encoding for spaces, symbols and Kurdish letters.

پیتەکانی URL، URI و URN چی دەگەیەنن و ئەم سێیە چ پەیوەندییەکیان پێکەوە هەیە؛ ئەو کە نین (mailto:، tel:، sms:، ⁦urn:⁩)؛ بەشەکانی ؛ بەراورد بە ؛ و بۆ بۆشایی، هێما و پیتی کوردی.

14 min read14 خولەک خوێندنەوە · 15 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain the words Uniform, Resource, Locator, Identifier and Name, and say how URL, URN and URI are related.
  • Recognise URIs that are not web pages (mailto:, tel:, sms:, urn:) and say what a phone does with each.
  • Name the parts of a URI: scheme, host, port, path, query and fragment.
  • Tell a link from a URL, and percent-encode spaces, symbols and Kurdish letters.
  • وشەکانی Uniform، Resource، Locator، Identifier و Name ڕوون بکەیتەوە و بڵێیت ، و چ پەیوەندییەکیان پێکەوە هەیە.
  • ئەو بناسیتەوە کە نین (mailto:، tel:، sms:، ⁦urn:⁩) و بڵێیت مۆبایل بە هەر یەکەیان چی دەکات.
  • بەشەکانی ناو ببەیت: ، ، ، ، و .
  • لە جیا بکەیتەوە و بۆشایی، هێما و پیتی کوردی بە بنووسیت.

A name, a number and an addressناو، ژمارە و ناونیشان

To send Aram a letter, the post office needs his address. His name says who he is, not where he lives. His ID card number identifies him even after he moves to another city.

بۆ ناردنی نامەیەک بۆ ئارام، پۆستەخانە پێویستی بە ناونیشانەکەی هەیە. ناوەکەی دەڵێت کێیە، نەک لە کوێ دەژی. ژمارەی ناسنامەکەیشی دەیناسێنێت، تەنانەت دوای ئەوەی بۆ شارێکی تر دەگوازرێتەوە.

Things on the internet need the same: an address (where it is), a name (what it is), or both. Three short words cover them: URL, URI and URN.

شتەکانی سەر هەمان شتیان پێویستە: ناونیشانێک (لە کوێیە)، ناوێک (چییە)، یان هەردووکیان. سێ وشەی کورت ئەمانە دەگرنەوە: ، و .

Address, name and ID numberناونیشان، ناو و ژمارەی ناسنامە

A URL is like a home address: it tells you where to go. A URN is like an ID card number: it names one person for life, wherever he lives. URI is the general word for both: anything that identifies.

وەک ناونیشانی ماڵ وایە: پێت دەڵێت بۆ کوێ بچیت. وەک ژمارەی ناسنامە وایە: یەک کەس بۆ هەمیشە ناو دەبات، لە هەر شوێنێک بژی. وشە گشتییەکەیە بۆ هەردووکیان: هەر شتێک کە دەناسێنێت.

Where the analogy stops workingسنووری ئەم نموونەیە

A home address can change when a family moves, and so can a URL when a site moves. A URN is meant never to change, but on its own it does not tell you where to find the thing.

ناونیشانی ماڵ دەگۆڕێت کاتێک خێزانێک دەگوازێتەوە، هەروەها کاتێک دەگوازرێتەوە. وا دانراوە هەرگیز نەگۆڕێت، بەڵام بە تەنها پێت ناڵێت شتەکە لە کوێ بدۆزیتەوە.

The Web Programming course already teaches how a web page's URL is built (URLs). This lesson is CêIT's home for URI and URN, and for URIs that are not web pages.

کۆرسی وێب پێشتر فێرمان دەکات چۆن دروست دەبێت (URLـەکان). ئەم وانەیە ماڵی و لە CêITـدا، هەروەها ماڵی ئەو کە نین.

What the letters of URL meanپیتەکانی URL چی دەگەیەنن

Definitionپێناسە

The full address of a resource on the Web. It has a scheme (https://), a , and often a , a and a .

ناونیشانی تەواوی سەرچاوەیەکە لەسەر وێب. لە پرۆتۆکۆڵ (https://)، و زۆرجار و و پێکدێت.

URL is short for Uniform Resource Locator. Most of us know it already: we use URLs every time we look for something on the internet.

URL کورتکراوەی ⁦Uniform Resource Locator⁩ـە. زۆرێکمان پێشتر پێی ئاشناین، چونکە هەموو جارێک کە بەدوای شتێکدا لە دەگەڕێین بەکاری دەهێنین.

  • Uniform: similar words are constant, identical and similar. Every URL follows the same rules on every system, which is why URLs work the same everywhere.
  • Resource: anything on a computer that a person can use and get something from: a text to read, a picture or a video to watch, a sound to listen to.
  • Locator: something that points to a place. The Kurdish paper calls it «جێ‌دەستنیشانکەر».
  • Uniform: هاوواتاکانی constant، identical و similarـن، کە لە کوردیدا دەبنە «جێگیر، هاوشێوە، یەکشێوە». هەموو لەسەر هەموو سیستەمێک هەمان یاسا پەیڕەو دەکات، بۆیە لە هەموو شوێنێک وەک یەک کار دەکەن.
  • Resource (): هەر شتێک لە کۆمپیوتەردا کە مرۆڤ بتوانێت بەکاری بهێنێت و سوودی لێ وەربگرێت: دەقێک بۆ خوێندنەوە، وێنەیەک یان ڤیدیۆیەک بۆ بینین، دەنگێک بۆ گوێگرتن.
  • Locator: واتای «جێ‌دەستنیشانکەر» دێت؛ شتێک کە شوێنێک دیاری دەکات.

So a URL is like an address for anything on the internet (a picture, a web page, a video, a sound file). It tells the browser where to go, and that is why it ends with the word Locator: it points the browser to the place you want.

کەواتە وەک ناونیشانێکە بۆ هەر شتێکی نێو (وێنە، ، ڤیدیۆ، دەنگ). بە دەڵێت بۆ کوێ بچێت، بۆیە وشەی Locatorـی پێوەیە: ئەو شوێنەی دەتەوێت بۆ دیاری دەکات.

Quick checkپشکنینی خێراWhich word inside "URL" tells you that it says where something is?کام وشەی نێو «URL» پێت دەڵێت کە دەڵێت شتێک لە کوێیە؟

URI: the umbrella wordURI: وشە چەترەکە

Definitionپێناسە

A string that identifies a : by where it is (a ), by its name (a ) or both. It starts with a and a colon, as in https://example.com/page, mailto:aram@example.com, tel:+9647500000000 or urn:isbn:0451450523.

کە دەناسێنێت: بە شوێنەکەی ()، بە ناوەکەی () یان بە هەردووکیان. بە و دووخاڵێک دەست پێ دەکات، وەک https://example.com/page، mailto:aram@example.com، tel:+9647500000000 یان urn:isbn:0451450523.

URI is short for Uniform Resource Identifier. It is new for many of us, but we already know two of its words; the new one is Identifier, «ناسێنەر»: something that tells which resource you mean.

URI کورتکراوەی ⁦Uniform Resource Identifier⁩ـە. بۆ زۆرێکمان تازەیە، بەڵام دوو وشەیمان لە بەشی پێشوودا ناسی؛ وشە نوێیەکە Identifierـە، واتە «ناسێنەر»: شتێک کە دەڵێت مەبەستت کام .

A URL, together with the Uniform Resource Name (URN), is part of URI. URI is the wider word: it stands over URL like an umbrella. The standard for URIs (RFC 3986) says it in one line: a URI can be a locator, a name, or both.

، لەپاڵ ⁦Uniform Resource Name⁩ ()دا، بەشێکە لە . وشە فراوانترەکەیە: وەک چەترێک بەسەر وەستاوە. ستانداردی ⁦(RFC 3986)⁩ بە یەک دێڕ دەیڵێت: دەکرێت جێ‌دەستنیشانکەر بێت، ناو بێت، یان هەردووکیان.

An umbrella labelled URI, Uniform Resource Identifier, identifies a resource. Under it, two boxes. Left, URL: locator, says WHERE it is, with the examples https://www.example.com/books/42 and https://maps.example.com/?q=Erbil. Right, URN: name, says WHAT it is, with the examples urn:isbn:0451450523 and urn:ietf:rfc:3986. A note at the bottom: a URI can be a locator, a name, or both; mailto:, tel: and sms: are URIs too.چەترێک بە ناونیشانی URI، ناسێنەری یەکشێوەی سەرچاوە، سەرچاوەیەک دەناسێنێت. لە ژێریدا دوو سندوق. چەپ، URL: جێ‌دەستنیشانکەر، دەڵێت لە کوێیە، بە نموونەکانی https://www.example.com/books/42 و https://maps.example.com/?q=Erbil. ڕاست، URN: ناو، دەڵێت چییە، بە نموونەکانی urn:isbn:0451450523 و urn:ietf:rfc:3986. تێبینییەک لە خوارەوە: URI دەکرێت جێ‌دەستنیشانکەر بێت، ناو بێت یان هەردووکیان؛ ناونیشانەکانی mailto، tel و smsـیش URIـن.
URI is the umbrella: URLs say where, URNs say what. چەترەکەیە: دەڵێت لە کوێ، دەڵێت چی.CêIT
Quick checkپشکنینی خێراWhich sentence is true?کام ڕستە ڕاستە؟

URI: the umbrella wordURI: وشە چەترەکە

URN: a name that does not moveURN: ناوێک کە ناگوازرێتەوە

Definitionپێناسە

A that names a for ever, without saying where to find it. It starts with urn:, as in urn:isbn:0451450523 for a book.

کە بۆ هەمیشە ناو دەنێت، بەبێ ئەوەی بڵێت لە کوێ دەدۆزرێتەوە. بە urn: دەست پێ دەکات، وەک urn:isbn:0451450523 بۆ کتێبێک.

A URN starts with urn:, then a namespace, then the name inside that namespace. urn:isbn:0451450523 names one book by its ISBN number. urn:ietf:rfc:3986 names the document that defines URIs. A URN says what something is, not where it is, so it stays the same when the book moves to another library or the document to another server.

بە urn: دەست پێ دەکات، پاشان بواری ناو ⁦(namespace)⁩، پاشان ناوەکە لەنێو ئەو بوارەدا. urn:isbn:0451450523 کتێبێک بە ژمارەی ISBNـەکەی ناو دەبات. urn:ietf:rfc:3986 ئەو بەڵگەنامەیە ناو دەبات کە پێناسە دەکات. دەڵێت شتێک چییە، نەک لە کوێیە، بۆیە کاتێک کتێبەکە بۆ کتێبخانەیەکی تر یان بەڵگەنامەکە بۆ تر دەگوازرێتەوە، وەک خۆی دەمێنێتەوە.

You cannot type a URN into a browser and get the book. Some service, such as a library catalogue, must turn the name into a location, and some URNs never point to a location at all.

ناتوانیت لە بنووسیت و کتێبەکە وەربگریت. خزمەتگوزارییەک، وەک فهرستی کتێبخانەیەک، دەبێت ناوەکە بکاتە شوێنێک. هەندێک هەرگیز ئاماژە بە هیچ شوێنێک ناکەن.

Quick checkپشکنینی خێراWhich of these is a URN?کامیان ؟

URIs that are not web pagesئەو URIـیانەی کە لاپەڕەتۆڕ نین

The paper makes an important point: a URI can carry an e-mail address or a phone number, not only the address of a website or a web page. On a phone, this is how one app opens another: it hands the operating system a URI, and the system picks the app for that scheme.

نووسینەکە خاڵێکی گرنگ دەڵێت: دەکرێت یان ژمارەی مۆبایل هەڵبگرێت، نەک تەنها ناونیشانی و . لەسەر مۆبایل، بەم شێوەیە تر دەکاتەوە: دەداتە و سیستەمەکە ئەو هەڵدەبژێرێت کە بۆ ئەو دانراوە.

Five URIs, coloured by part, and what a phone does with each. https://www.example.com/books (scheme https, host www.example.com, path /books) opens the web browser. mailto:aram@example.com?subject=Homework (scheme, path, query) opens the e-mail app with the address filled in. tel:+9647500000000 opens the phone app, ready to call. sms:+9647500000000?body=See%20you opens Messages with the text already typed. urn:isbn:0451450523 names a book; there is nothing to open. A note: after mailto:, tel:, sms: and urn: there is no // and no host; the whole rest is the path.پێنج URI کە بەشەکانیان ڕەنگ کراون، لەگەڵ ئەوەی مۆبایل بە هەر یەکەیان دەکات. https://www.example.com/books (سکیم https، هۆست www.example.com، ڕێڕەو /books) تۆڕگەڕ دەکاتەوە. mailto:aram@example.com?subject=Homework (سکیم، ڕێڕەو، زنجیرەی پرس) ئەپی ئیمەیڵ دەکاتەوە و ناونیشانەکە نووسراوە. tel:+9647500000000 ئەپی پەیوەندیکردن دەکاتەوە، ئامادەی لێدان. sms:+9647500000000?body=See%20you ئەپی نامەکان دەکاتەوە و دەقەکە نووسراوە. urn:isbn:0451450523 ناوی کتێبێکە؛ هیچ شتێک ناکرێتەوە. تێبینییەک: دوای mailto، tel، sms و urn هیچ // و هۆست نییە؛ هەموو بەشەکەی تر ڕێڕەوە.
Not every URI is a web page: the scheme decides which app opens it.هەموو نییە: بڕیار دەدات کام بیکاتەوە.CêIT
  • mailto: opens the e-mail app. A ?subject= or ?body= part fills in the message.
  • tel: opens the phone app with the number ready; the user still presses Call.
  • sms: opens Messages; ?body= puts the text in, and the user can change it before sending.
  • urn: only names something; there is nothing to open.
  • mailto: ئەپی دەکاتەوە. بەشێکی ?subject= یان ?body= نامەکە پڕ دەکاتەوە.
  • tel: ئەپی پەیوەندیکردن بە ژمارەکەوە دەکاتەوە؛ هێشتا خۆی پەنجە بە Call دادەگرێت.
  • sms: ئەپی نامەکان دەکاتەوە؛ ?body= دەقەکە دادەنێت و دەتوانێت پێش ناردن بیگۆڕێت.
  • urn: تەنها شتێک ناو دەبات؛ هیچ شتێک نییە بکرێتەوە.

In the Flutter track, Opening links and other apps shows how an app opens tel:, sms: and mailto: URIs, and Building URIs in Dart builds sms: and mailto: links correctly in code.

لە بەشی Flutterـی ئەم کۆرسەدا، کردنەوەی بەستەرەکان و ئەپەکانی تر پیشان دەدات چۆن tel:، sms: و mailto: دەکاتەوە. دروستکردنی URI لە Dartـدا sms: و mailto: بە دروستی لە کۆددا دروست دەکات.

Quick checkپشکنینی خێراWhich URI makes a phone open its dialer with a number ready?کام وا دەکات مۆبایل ئەپی پەیوەندیکردن بە ژمارەیەکی ئامادەوە بکاتەوە؟

The parts of a URIبەشەکانی URI

Every URI follows one general pattern. Only the scheme and the path are required; the path may even be empty.

هەموو پەیڕەوی یەک نەخشەی گشتی دەکات. تەنها و پێویستن؛ دەتوانێت بەتاڵیش بێت.

The generic URI syntax (RFC 3986) and one exampleڕێزمانی گشتیی URI ⁦(RFC 3986)⁩ و نموونەیەکTEXT
scheme:[//authority]path[?query][#fragment]

https://www.example.com:443/courses/flutter?lang=ckb#intro
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 1

Square brackets mean "this part may be missing".

کەوانەی چوارگۆشە واتە «ئەم بەشە دەکرێت نەبێت».

Lineدێڕی 3

authority = host + port: www.example.com:443

authority واتە + : ⁦www.example.com:443⁩

An animation that takes the URI https://www.example.com:443/courses/flutter?lang=ckb#intro apart. It first appears in grey. Then, one part per frame, a coloured box appears with a large label: scheme https (how to reach it: here HTTPS), host www.example.com (which server, a domain name), port :443 (which door on the server; 443 is the usual HTTPS port), path /courses/flutter (which resource on that server), query ?lang=ckb (extra data as key=value pairs) and fragment #intro (a place inside the page; never sent to the server). In the last frame the six parts stand apart with their names; host and port are marked together as the authority, with three notes: only the scheme and the path are required; the browser keeps the fragment for itself; port 443 is the default for HTTPS, so browsers hide it.
An animation that takes the URI https://www.example.com:443/courses/flutter?lang=ckb#intro apart. It first appears in grey. Then, one part per frame, a coloured box appears with a large label: scheme https (how to reach it: here HTTPS), host www.example.com (which server, a domain name), port :443 (which door on the server; 443 is the usual HTTPS port), path /courses/flutter (which resource on that server), query ?lang=ckb (extra data as key=value pairs) and fragment #intro (a place inside the page; never sent to the server). In the last frame the six parts stand apart with their names; host and port are marked together as the authority, with three notes: only the scheme and the path are required; the browser keeps the fragment for itself; port 443 is the default for HTTPS, so browsers hide it.
One URI taken apart: six parts, each with its own job. کە لێک جیا کراوەتەوە: شەش بەش، هەر یەکە کاری خۆی.CêIT
PartبەشIn the exampleلە نموونەکەداIts jobکارەکەی
Schemeبەشی httpsWhich rules to use; on the Web it names the protocol.کام یاسا بەکار بهێنرێت؛ لە وێبدا ناو دەبات.
Hostبەشی www.example.comWhich server: a domain name or an IP address.کام : یان .
Portبەشی :443Which door on the server; hidden when it is the default.کام دەرگای ؛ کاتێک بنەڕەتی بێت دەشاردرێتەوە.
Pathبەشی /courses/flutterWhich resource on that server.کام لەسەر ئەو .
Queryبەشی ?lang=ckbExtra data as key=value pairs, joined with &. زیادە بە شێوەی key=value، کە بە & پێکەوە دەبەسترێن.
Fragmentبەشی #introA place inside the page; the browser keeps it.شوێنێک لەنێو لاپەڕەکەدا؛ بۆ خۆی دەیهێڵێتەوە.

The Web Programming course explains the parts of web URLs in detail: the three parts, the optional parts and domain names and DNS. When a browser asks for the page, the path and the query travel to the server in the request, but the fragment stays in the browser: see the request.

کۆرسی وێب بەشەکانی وێب بە وردی ڕوون دەکاتەوە: سێ بەشەکە، بەشە ئارەزوومەندانەکان و ناوەکانی دۆمەین و DNS. کاتێک داوای لاپەڕەکە دەکات، و لەنێو دەچن بۆ ، بەڵام لە دەمێنێتەوە: داواکارییەکە ببینە.

Quick checkپشکنینی خێراWhich part of https://www.example.com:443/courses/flutter?lang=ckb#intro is never sent to the server?کام بەشی https://www.example.com:443/courses/flutter?lang=ckb#intro هەرگیز بۆ نانێردرێت؟

The parts of a URIبەشەکانی URI

Host or path? A common trapهۆست یان ڕێڕەو؟ تەڵەیەکی باو

The name of the website (www.example.com) is the host, not the path. A common bug when a program builds a URI from parts is to put the website name in the path and leave the host empty. The result is https:www.example.com: no // and no host, so the browser cannot open it. The correct URI is https://www.example.com, with the name as the host.

ناوی (www.example.com) ، نەک . هەڵەیەکی باو کاتێک لە بەشەکانەوە دروست دەکات ئەوەیە کە ناوی لە دابنێت و بەتاڵ بهێڵێتەوە. ئەنجامەکە دەبێتە https:www.example.com: نە // و نە ، بۆیە ناتوانێت بیکاتەوە. ڕاستەکە https://www.example.comـە، کە ناوەکە تێیدا .

In the Flutter track, The host-or-path bug shows how this happens in Dart code and how to fix it.

لە بەشی Flutterـی ئەم کۆرسەدا، هەڵەی هۆست یان ڕێڕەو پیشان دەدات ئەم هەڵەیە چۆن لە کۆدی Dartـدا ڕوو دەدات و چۆن چاک دەکرێتەوە.

Quick checkپشکنینی خێراA program built the URI https:www.example.com. What went wrong? https:www.example.com دروست کرد. چی هەڵە بوو؟

Spaces, symbols and Kurdish letters: percent-encodingبۆشایی، هێما و پیتی کوردی: ئینکۆدینگی سەدی

A URI may contain only a small set of characters: English letters, digits and a few symbols. Some symbols have a job, such as : / ? # & =. A space or a Kurdish letter is not allowed at all. So these characters are written in a code called percent-encoding.

تەنها دەتوانێت کۆمەڵێکی بچووک لەخۆ بگرێت: پیتی ئینگلیزی، ژمارە و چەند هێمایەک. هەندێک هێما کاری خۆیان هەیە، وەک : / ? # & =. بۆشایی یان پیتی کوردی هەرگیز ڕێگەپێدراو نین. بۆیە ئەمانە بە کۆدێک دەنووسرێن بە ناوی .

Definitionپێناسە

Writing characters that are not allowed in a part of a as % followed by two hexadecimal digits for each byte in UTF-8. A space becomes %20, and each Kurdish letter becomes two such codes.

نووسینی ئەو کە لە بەشێکی ڕێگەپێدراو نین، بە % و دوو ژمارەی شانزەیی بۆ هەر بایتێکی ⁦UTF-8⁩. بۆشایی دەبێتە %20 و هەر پیتێکی کوردی دەبێتە دوو کۆدی لەو جۆرە.

How percent-encoding worksئینکۆدینگی سەدی چۆن کار دەکات
  1. Bytesبایتەکان

    Turn the text into bytes with UTF-8. An English letter is one byte; a Kurdish letter is two.

    دەقەکە بە ⁦UTF-8⁩ بکە بە زنجیرەیەک . پیتێکی ئینگلیزی یەک ؛ پیتێکی کوردی دوو .

  2. Keep the safe onesسەلامەتەکان وەک خۆیان بهێڵەوە

    Letters A–Z and a–z, digits 0–9 and the four symbols - . _ ~ stay as they are.

    پیتەکانی ⁦A–Z⁩ و ⁦a–z⁩، ژمارەکانی ⁦0–9⁩ و چوار هێمای - . _ ~ وەک خۆیان دەمێننەوە.

  3. Encode the restئەوانی تر بگۆڕە

    Every other byte becomes % and two hexadecimal digits, written in capitals.

    هەموو تر دەبێتە % و دوو ژمارەی ، بە پیتی گەورە.

Some characters and their codes (UTF-8)هەندێک و کۆدەکانیان ⁦(UTF-8)⁩
CharacterBytes (hexadecimal) ()Percent-encoded
spaceبۆشایی20%20
?3F%3F
&26%26
,2C%2C
!21%21
%25%25
the Kurdish letter سپیتی سD8 B3%D8%B3
the Kurdish letter ڵپیتی ڵDA B5%DA%B5
Quick checkپشکنینی خێراHow is a space written in percent-encoding inside a URI?بۆشایی لە لەنێو چۆن دەنووسرێت؟

How Do URLs Work?Techquickie · Englishئینگلیزی · 447K viewsبینین · 15K likesلایک · Partبەشی 3:40–4:13 (ofلە 5:35)

Each part of a web address explained: scheme, domain name and top-level domain, path, query string and fragment.

هەر بەشێکی ڕوون دەکاتەوە: scheme، و ، ، و fragment.

Watch 3:40-4:13: non-Latin domain names (xn--) and percent-encoding in the path, e.g. %24 for $; stops before the sponsor.

لە ⁦3:40⁩ تا ⁦4:13⁩ سەیر بکە: بە پیتی نالاتینی (xn--) و لە ، بۆ نموونە %24 بۆ $؛ پێش ڕیکلامی سپۆنسەر ڕادەوەستێت.

Spaces, symbols and Kurdish letters: percent-encodingبۆشایی، هێما و پیتی کوردی: ئینکۆدینگی سەدی

Percent-encoding: examples and trapsئینکۆدینگی سەدی: نموونە و تەڵەکان

For example, the message "Hello, how are you?" becomes Hello%2C%20how%20are%20you%3F, so a link that opens Messages with this text is sms:1234567890?body=Hello%2C%20how%20are%20you%3F. To read hexadecimal digits, see binary, octal and hexadecimal.

بۆ نموونە، نامەی «⁦Hello, how are you?⁩» دەبێتە Hello%2C%20how%20are%20you%3F، بۆیە کە ئەپی نامەکان بەم دەقەوە بکاتەوە sms:1234567890?body=Hello%2C%20how%20are%20you%3Fـە. بۆ خوێندنەوەی ژمارە ، دوویی، هەشتی و شانزەیی ببینە.

  • Browsers decode the codes for display, so the address bar may show Kurdish letters while the real URI contains %XX codes.
  • Encode once. Encoding twice turns every % into %25, so %D8 becomes %25D8 and the text arrives broken.
  • In HTML form data a space may be written as +. In mailto: and sms: URIs write %20, because + may be a real plus sign there.
  • کۆدەکان بۆ پیشاندان دەگەڕێننەوە، بۆیە لەوانەیە پیتی کوردی پیشان بدات لە کاتێکدا ڕاستەقینەکە کۆدی %XXـی تێدایە.
  • یەک جار بیگۆڕە. دوو جار گۆڕین هەموو %ـێک دەکاتە %25، بۆیە %D8 دەبێتە %25D8 و دەقەکە تێکچوو دەگات.
  • لە فۆرمی HTMLـدا بۆشایی دەکرێت وەک + بنووسرێت. لە mailto: و sms:ـدا %20 بنووسە، چونکە لەوێ + دەکرێت نیشانەی کۆی ڕاستەقینە بێت.
Quick checkپشکنینی خێراA text is encoded twice by mistake. What does %20 become?دەقێک بە هەڵە دوو جار گۆڕدراوە. %20 دەبێتە چی؟

Common mistakesهەڵە باوەکان

MistakeهەڵەWhat is trueڕاستییەکە
"URL and URI are two different things."« و دوو شتی جیاوازن.»A URL is a kind of URI: the kind that says where something is. جۆرێکە لە : ئەو جۆرەی دەڵێت شتێک لە کوێیە.
"Every URI opens in a browser."«هەموو لە دەکرێتەوە.»tel: opens the phone app, mailto: the mail app, and a urn: opens nothing.tel: ئەپی پەیوەندیکردن دەکاتەوە، mailto: ئەپی و urn: هیچ شتێک ناکاتەوە.
"A link and a URL are the same."« و هەمان شتن.»The link is the clickable element; the URL is the address inside it. کرتەلێدراوەکەیە؛ ناونیشانەکەیە لەنێویدا.
"The website name is the path."«ناوی .»It is the host, after //. The path comes after the host.، دوای //. دوای دێت.
"Spaces and Kurdish letters can go straight into a URI."«بۆشایی و پیتی کوردی ڕاستەوخۆ دەچنە نێو .»They must be percent-encoded: a space is %20, س is %D8%B3.دەبێت بە بنووسرێن: بۆشایی %20ـە، س %D8%B3ـە.
Encoding a text twice.دوو جار گۆڕینی دەقێک.% becomes %25 and the text breaks. Encode once.% دەبێتە %25 و دەقەکە تێک دەچێت. یەک جار بیگۆڕە.
"The server receives the #fragment."« وەردەگرێت.»The browser keeps the fragment; only the path and query are sent. بۆ خۆی دەهێڵێتەوە؛ تەنها و دەنێردرێن.

Exercisesڕاهێنانەکان

ExerciseڕاهێنانTake it apartلێکی جیا بکەرەوە

Name every part of https://shop.example.com:8080/bread/naan?size=large&qty=2#reviews.

هەموو بەشەکانی https://shop.example.com:8080/bread/naan?size=large&qty=2#reviews ناو ببە.

Show answerوەڵامەکە پیشان بدە
PartبەشValueنرخ
Schemehttps
Hostshop.example.com
Port8080
Path/bread/naan
Query (two key=value pairs) (دوو )size=large&qty=2
Fragmentreviews
ExerciseڕاهێنانLocator, name or other URI?جێ‌دەستنیشانکەر، ناو یان URIـیەکی تر؟

Sort these: (a) https://www.example.com/books/42; (b) urn:isbn:0451450523; (c) mailto:aram@example.com; (d) tel:+9647500000000. Which is a web URL, which is a URN, and which are other URIs?

ئەمانە پۆلێن بکە: (أ) https://www.example.com/books/42؛ (ب) urn:isbn:0451450523؛ (ج) mailto:aram@example.com؛ (د) tel:+9647500000000. کامیان وێبە، کامیان و کامیان ترن؟

Show answerوەڵامەکە پیشان بدە
  • (a) A web URL: it says where the page is.
  • (b) A URN: it names a book.
  • (c) and (d) Other URIs with their own schemes: an e-mail address and a phone number. All four are URIs.
  • (أ) وێب: دەڵێت لاپەڕەکە لە کوێیە.
  • (ب) : کتێبێک ناو دەبات.
  • (ج) و (د) تر بە خۆیانەوە: و ژمارەیەکی مۆبایل. هەر چواریان .
ExerciseڕاهێنانExplain the wordsوشەکان ڕوون بکەرەوە

Explain in your own words what Uniform, Resource, Locator and Identifier mean in URL and URI, and why URI is called an umbrella.

بە وشەی خۆت ڕوونی بکەرەوە Uniform، Resource، Locator و Identifier لە URL و URIـدا چی دەگەیەنن و بۆچی بە دەوترێت چەتر.

Show answerوەڵامەکە پیشان بدە
  • Uniform: the same rules everywhere, so addresses work on every system.
  • Resource: anything useful you can reach: a page, a picture, a video, a sound.
  • Locator: points to where the resource is.
  • Identifier: tells which resource you mean, by its place, its name or both.
  • URI is the umbrella because both URLs (locators) and URNs (names) are URIs.
  • Uniform: هەمان یاسا لە هەموو شوێنێک، بۆیە ناونیشانەکان لەسەر هەموو سیستەمێک کار دەکەن.
  • Resource: هەر شتێکی بەسوود کە پێی دەگەیت: لاپەڕە، وێنە، ڤیدیۆ، دەنگ.
  • Locator: دیاری دەکات لە کوێیە.
  • Identifier: دەڵێت مەبەستت کام ، بە شوێنەکەی، ناوەکەی یان هەردووکیان.
  • چەترەکەیە چونکە هەم (جێ‌دەستنیشانکەر) و هەم (ناو) .
Quick checkپشکنینی خێراIn https://shop.example.com:8080/bread/naan?size=large&qty=2#reviews, what is 8080?لە https://shop.example.com:8080/bread/naan?size=large&qty=2#reviewsـدا، 8080 چییە؟

Exercisesڕاهێنانەکان

More exercisesڕاهێنانی زیاتر

ExerciseڕاهێنانEncode itبیگۆڕە

Percent-encode (a) Erbil & Duhok and (b) See you at 5?. Then write an sms: URI for the number +9647500000000 with the text (b).

(أ) Erbil & Duhok و (ب) See you at 5? بە بنووسە. پاشان sms: بۆ ژمارەی +9647500000000 بە دەقی (ب) بنووسە.

Hintئاماژە

Use the table: space %20, & %26, ? %3F.

خشتەکە بەکاربهێنە: بۆشایی %⁦20⁩، ⁦& %26⁩، ? %⁦3F⁩.

Show answerوەڵامەکە پیشان بدە
TEXT
(a) Erbil%20%26%20Duhok
(b) See%20you%20at%205%3F
sms:+9647500000000?body=See%20you%20at%205%3F
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 1

space = %20, & = %26

بۆشایی = %⁦20⁩، ⁦& = %26⁩

Lineدێڕی 2

? = %3F; letters and digits stay

? = %⁦3F⁩؛ پیت و ژمارە وەک خۆیان دەمێننەوە

ExerciseڕاهێنانFind the bugهەڵەکە بدۆزەوە

A classmate's app should open the course page, but the URI it builds is https:www.example.com/courses. What is wrong, and what should it be?

هاوپۆلێک دەبێت لاپەڕەی کۆرسەکە بکاتەوە، بەڵام ئەو دروستی دەکات https:www.example.com/coursesـە. چی هەڵەیە و دەبێت چی بێت؟

Show answerوەڵامەکە پیشان بدە

The // and the host are missing: the website name ended up in the path. It should be https://www.example.com/courses, with www.example.com as the host and /courses as the path.

// و کەمن: ناوی کەوتووەتە نێو . دەبێت https://www.example.com/courses بێت، کە www.example.com و /courses .

Quick checkپشکنینی خێراWhich URI is written correctly for an SMS with the text "Hi Lana"?کام بە دروستی نووسراوە بۆ بە دەقی «⁦Hi Lana⁩»؟

Summaryپوختە

  • URI (Uniform Resource Identifier) is the umbrella: any string that identifies a resource.
  • A URL (Locator) says where a resource is; a URN (Name) says what it is, like urn:isbn:….
  • Not every URI is a web page: mailto:, tel:, sms: and urn: have no // and no host.
  • Parts: scheme://host:port/path?query#fragment. Only the scheme and the path are required; the fragment stays in the browser.
  • A link is clickable; the URL is the address text inside it.
  • Percent-encoding writes other characters as % + two hex digits per UTF-8 byte: space %20, س %D8%B3. Encode once.
  • (⁦Uniform Resource⁩ Identifier) چەترەکەیە: هەر کە بناسێنێت.
  • ⁦(Locator)⁩ دەڵێت لە کوێیە؛ ⁦(Name)⁩ دەڵێت چییە، وەک urn:isbn:….
  • هەموو نییە: mailto:، tel:، sms: و urn: نە //ـیان هەیە و نە .
  • بەشەکان: scheme://host:port/path?query#fragment، واتە ، ، ، ، و . تەنها و پێویستن؛ لە دەمێنێتەوە.
  • کرتەلێدراوە؛ دەقی ناونیشانەکەیە لەنێویدا.
  • تر بۆ هەر ⁦UTF-8⁩ بە % + دوو ژمارەی دەنووسێت: بۆشایی %20، س %D8%B3. یەک جار بیگۆڕە.
Review questionsپرسیارەکانی پێداچوونەوە
Why does a URN not change when a book moves to another library?بۆچی URN ناگۆڕێت کاتێک کتێبێک بۆ کتێبخانەیەکی تر دەگوازرێتەوە؟

Because it names the book, not its place.

چونکە کتێبەکە ناو دەبات، نەک شوێنەکەی.

What is the difference between a link and a URL?جیاوازیی نێوان بەستەر و URL چییە؟

The link is the clickable element; the URL is the address inside it, which can also be written or spoken as plain text.

کرتەلێدراوەکەیە؛ ناونیشانەکەیە لەنێویدا، کە دەکرێت وەک دەقێکی سادەش بنووسرێت یان بوترێت.

Why must «سڵاو» be percent-encoded in a URI?بۆچی دەبێت «سڵاو» لە URIـدا بە ئینکۆدینگی سەدی بنووسرێت؟

Kurdish letters are not allowed directly in a URI, so each UTF-8 byte is written as %XX: %D8%B3%DA%B5%D8%A7%D9%88.

پیتی کوردی ڕاستەوخۆ لە ڕێگەپێدراو نییە، بۆیە هەر ⁦UTF-8⁩ وەک %XX دەنووسرێت: %D8%B3%DA%B5%D8%A7%D9%88.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

URIs, URLs, and URNs | Difference between URI and URL | URL ExplainedThe TechCave · Englishئینگلیزی · 234K viewsبینین · 7.5K likesلایک

URI is the umbrella; a URL also says where a resource is. Then the parts: scheme, host, port, path, query and fragment.

ناوە گشتییەکەیە؛ جگە لەوە دەڵێت لە کوێیە. پاشان بەشەکان: ، ، ، ، و .

Whole video: URI vs URL vs URN and the parts of a URL.

هەموو ڤیدیۆکە: بەرامبەر و ، پاشان بەشەکانی .

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Mobile Cloud and Backend-as-a-Serviceهەورەژمێرکاریی مۆبایل و BaaS

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.