{"id":1044,"date":"2019-05-29T11:34:44","date_gmt":"2019-05-29T19:34:44","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=1044"},"modified":"2019-05-29T11:34:44","modified_gmt":"2019-05-29T19:34:44","slug":"same-origin-policy-in-javascript","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=1044","title":{"rendered":"Same origin policy in javascript"},"content":{"rendered":"<p>Under the policy, a <a class=\"mw-redirect\" title=\"Web browser engine\" href=\"https:\/\/en.wikipedia.org\/wiki\/Web_browser_engine\">web browser<\/a> permits scripts contained in a first web page to access data in a second web page, but only if both web pages have the same <i>origin<\/i>. An origin is defined as a combination of <a title=\"Uniform Resource Identifier\" href=\"https:\/\/en.wikipedia.org\/wiki\/Uniform_Resource_Identifier\">URI scheme<\/a>, <a title=\"Hostname\" href=\"https:\/\/en.wikipedia.org\/wiki\/Hostname\">host name<\/a>, and <a title=\"Port (computer networking)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Port_(computer_networking)\">port number<\/a>. This policy prevents a malicious script on one page from obtaining access to sensitive data on another web page through that page&#8217;s <a title=\"Document Object Model\" href=\"https:\/\/en.wikipedia.org\/wiki\/Document_Object_Model\">Document Object Model<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Under the policy, a web browser permits scripts contained in a first web page to access data in a second web page, but only if both web pages have the same origin. An origin is defined as a combination of URI scheme, host name, and port number. This policy prevents a malicious script on one &hellip; <a href=\"http:\/\/www.tech.dimprash.com\/?p=1044\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Same origin policy in javascript<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1044","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/1044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1044"}],"version-history":[{"count":1,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/1044\/revisions"}],"predecessor-version":[{"id":1045,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/1044\/revisions\/1045"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1044"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}