You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Luqmaan Dawoodjee edited this page Aug 4, 2014
·
1 revision
no server
github pages to serve static files
static data like route shapes are stored in the repo as json
to fetch them just make an ajax request .e.g /data/shape_801_1.json
ajax + cors
what is cors?
browsers block you from making ajax requests to all sites unless the site explicitly permits it.
two ways the server can explicitly allow it
send back a jsonp response
send back allow-access-control headers
how do you talk to APIs that are shitty and don't send the right cors headers?
use a proxy
how do you get a proxy without