diff --git a/3-frames-and-windows/03-cross-window-communication/article.md b/3-frames-and-windows/03-cross-window-communication/article.md index 091a0cecb..e9d92c5b3 100644 --- a/3-frames-and-windows/03-cross-window-communication/article.md +++ b/3-frames-and-windows/03-cross-window-communication/article.md @@ -1,130 +1,130 @@ -# Cross-window communication +# Міжвіконна комунікація -The "Same Origin" (same site) policy limits access of windows and frames to each other. +Політика "Одного походження" (Same Origin), іншими словами один й той самий сайт, вона обмежує доступ вікон і фреймів один до одного. -The idea is that if a user has two pages open: one from `john-smith.com`, and another one is `gmail.com`, then they wouldn't want a script from `john-smith.com` to read our mail from `gmail.com`. So, the purpose of the "Same Origin" policy is to protect users from information theft. +Ідея полягає в тому, що якщо користувач має дві відкриті сторінки: одну з `john-smith.com`, а іншу -- `gmail.com`, тоді він не хоче, щоб скрипт з `john-smith.com` читав пошту з `gmail.com`. Отже, мета політики "Одного походження" -- захистити користувачів від крадіжки даних. -## Same Origin [#same-origin] +## Політика "Одного походження" (Same Origin) [#same-origin] -Two URLs are said to have the "same origin" if they have the same protocol, domain and port. +Кажуть, що дві URL-адреси мають "одне походження", якщо вони мають однаковий протокол, домен і порт. -These URLs all share the same origin: +Усі ці URL-адреси мають одне походження: - `http://site.com` - `http://site.com/` - `http://site.com/my/page.html` -These ones do not: +А ці ні: -- http://www.site.com (another domain: `www.` matters) -- http://site.org (another domain: `.org` matters) -- https://site.com (another protocol: `https`) -- http://site.com:8080 (another port: `8080`) +- http://www.site.com (інший домен: `www.` має значення) +- http://site.org (інший домен: `.org` має значення) +- https://site.com (інший протокол: `https`) +- http://site.com:8080 (інший порт: `8080`) -The "Same Origin" policy states that: +У політиці "Одного походження" зазначено, що: -- if we have a reference to another window, e.g. a popup created by `window.open` or a window inside `