I'm jusing jQuery's $.getJSON function to return a short set of json data.
I've got the JS sitting on a url (http://example.com
). ¬†I didn't realize, but I was accessing as (http://www.example.com
) which kept the JSON from loading. ¬†I followed through console and found that XMLHttpRequest couldn't load due to Access-Control-Allow-Origin.
Now, I've read through, alot of sites just said to use getJSON and that would be the work around, but obviously it didn't work. ¬†Is there something I should change in the headers or in the function?
Help is greatly appreciated it.