The server response also includes several CORS-specific headers: rack-cors has also added some additional CORS-specific headers with default values: According to Wikipedia, CORS is currently supported by all major browsers (IE 8+) except Opera. Access-Control-Allow-Headers: list of request header values the server is willing to support, Access-Control-Expose-Headers: list of headers that will be present in the actual response. JSONP . Answer for How to write and read fields through model in Yii framework? Read more about CORS here https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS. JSONP was a convenient approach but in Spring 5 we must use CORS since AbstractJsonpResponseBodyAdvice was deprecated. Now create a HTML file and place it on another server like Apache HTTP or other that runs on something else than 8080. Java, Android, Javascript, HTML, JSP, JSF, SQL, Geoserver, OpenLayers, Algorithms, Datastructures. JSONP takes advantage of the fact that JavaScript’s same origin policy doesn’t apply to the HTML