Skip to content

Commit 8f2a473

Browse files
committed
merging all conflicts
2 parents f87eacd + 52c1e61 commit 8f2a473

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

1-js/01-getting-started/1-intro/article.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,15 @@ Contoh sekatan tersebut termasuk:
7474

7575
Ini dipanggil "Dasar Asal Sama". Untuk mengatasinya, *kedua-dua halaman* mesti bersetuju untuk pertukaran data dan mesti mengandungi kod JavaScript khas yang mengendalikannya. Kami akan membincangkannya dalam tutorial.
7676

77+
<<<<<<< HEAD
7778
Had ini, sekali lagi, untuk keselamatan pengguna. Halaman daripada `http://anysite.com` yang dibuka oleh pengguna mestilah tidak boleh mengakses tab penyemak imbas lain dengan URL `http://gmail.com`, sebagai contoh, dan mencuri maklumat dari sana.
7879
- JavaScript boleh berkomunikasi dengan mudah melalui jaring ke pelayan tempat asal halaman semasa. Tetapi keupayaannya untuk menerima data daripada tapak/domain lain adalah lumpuh. Walaupun boleh, ia memerlukan persetujuan yang jelas (dinyatakan dalam pengepala HTTP) dari bahagian jauh. Sekali lagi, itu adalah had keselamatan.
80+
=======
81+
This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and must contain special JavaScript code that handles it. We'll cover that in the tutorial.
82+
83+
This limitation is, again, for the user's safety. A page from `http://anysite.com` which a user has opened must not be able to access another browser tab with the URL `http://gmail.com`, for example, and steal information from there.
84+
- JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is severely limited. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation.
85+
>>>>>>> 52c1e61915bc8970a950a3f59bd845827e49b4bf
7986
8087
![](limitations.svg)
8188

0 commit comments

Comments
 (0)