Go实战--golang中使用echo框架中JSONP(labstack/echo)
生命不止,继续 go go go !!!
继续,echo web框架,今天就聊一聊JSONP。
JSONP
1、什么是JSONP?
JSONP (JSON with padding) is used to request data from a server residing in a different domain than the client. It was proposed by Bob Ippolito in 2005.
JSONP enables sharing of data bypassing same-origin policy. The policy disallows running JavaScript to read media DOM elements or XHR data fetched from outside the page’s origin. The aggregation of the site’s scheme, port number and host name identifies as its origin. Due to inherent insecurities, JSONP is being replaced by CORS.
关于golang中cors可以参考:Go实战–golang中使用echo框架中的cors(labstack/echo、rs/cors)
要了解JSONP,不得不提一下JSON,那么什么是JSON ?
JSON is a subset of the object literal not
还没有评论,来说两句吧...