I need my JS app to fetch data from a remote server, which is, of course, blocked by the Same-Origin policy. I have considered (but not tried) several ways of doing this:
- Using JSONP
- Running my script in a Chrome extension and putting the required domain into
permissions
inmanifest.json
- Making a request to my hosted php script, which could fetch the data from the website and display it for my XHR to read
Which of these would work the best (or work at all)? And have I overlooked any easier methods?