From 7b29e77f1242d6f59ba5e9fba01086ec16c65eca Mon Sep 17 00:00:00 2001 From: xanhacks Date: Wed, 10 Apr 2024 19:20:07 +0200 Subject: [PATCH] add jsonp --- content/docs/client-side/jsonp.md | 37 +++++++++++++++++++++++++++++++ content/docs/framework/express.md | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 content/docs/client-side/jsonp.md diff --git a/content/docs/client-side/jsonp.md b/content/docs/client-side/jsonp.md new file mode 100644 index 0000000..1d152ed --- /dev/null +++ b/content/docs/client-side/jsonp.md @@ -0,0 +1,37 @@ +--- +title: "JSONP" +description: "Overview of JSONP." +lead: "Overview of JSONP." +date: 2020-10-06T08:49:31+00:00 +lastmod: 2020-10-06T08:49:31+00:00 +draft: false +images: [] +menu: + docs: + parent: "client-side" +weight: 630 +toc: true +--- + +## Definition + +JSONP (`JSON with padding`) is a technique used in web development to enable cross-origin data sharing between two domains. It exists primarily to bypass the same-origin policy imposed by web browsers, which restricts JavaScript from reading JSON cross-site. + +The same-origin policy is a security measure that prevents one website from interfering with another. However, sometimes it's necessary for a website to access data or resources from another domain, such as when using APIs provided by other services. JSONP provides a way to achieve this by exploiting the fact that `