mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 13:09:33 -06:00
Using AJAX instead of JSONP can give better caching in the browser, since the URL doesn't need to contain a (dynamically generated) callback function name. But because of the same origin policy in JavaScript, AJAX can only be used when the HTML file is served from the same server as the PGF. The new function http_get_json in support.js uses AJAX if this is the case, and falls back to JSONP otherwise.