You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 5-network/07-url/article.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -114,26 +114,26 @@ for(let [name, value] of url.searchParams) {
114
114
```
115
115
116
116
117
-
## Encoding
117
+
## Кодування
118
118
119
-
There's a standard [RFC3986](https://tools.ietf.org/html/rfc3986) that defines which characters are allowed in URLs and which are not.
119
+
Набір символів, що можуть дозволено до використання в URL-адресах, визначено в стандарті [RFC3986](https://tools.ietf.org/html/rfc3986).
120
120
121
-
Those that are not allowed, must be encoded, for instance non-latin letters and spaces - replaced with their UTF-8 codes, prefixed by `%`, such as `%20` (a space can be encoded by `+`, for historical reasons, but that's an exception).
121
+
Усі інші символи, що не дозволені стандартом, повинні бути закодовані. Наприклад, не латинські букви та пробіл повинні бути заміненими на їх UTF-8 коди, що починаються з `%`. Пробіл буде закодовано у вигляді `%20` (з історичних причин пробіл дозволено закодувати як `+`).
122
122
123
-
The good news is that `URL`objects handle all that automatically. We just supply all parameters unencoded, and then convert the `URL`to string:
123
+
Гарна новина полягає в тому, що `URL`об'єкт виконає всі перетворення автоматично. Нам потрібно тільки передати всі параметри, а потім перетворити `URL`в рядок:
124
124
125
125
```js run
126
-
//using some cyrillic characters for this example
126
+
//для прикладу використано кириличні символи
127
127
128
-
let url =newURL('https://ru.wikipedia.org/wiki/Тест');
128
+
let url =newURL('https://uk.wikipedia.org/wiki/Тест');
0 commit comments