views:

22

answers:

1

I have a javascript -> c# array parser that I would like to feed with some .js files from the internet, so what I'd like is to download those files and have the interpreter run them through. Only problem is that I can't do this since there is no crossdomainpolicy on the sites that I dl from, but I don't get why that should be an obstacle. I Can retrieve the js from just browsing to it in my browser, so why can't I retrieve the exact same text from code for further processing? how can I get to download the js files from the web?

A: 

Why don't you just upload copies of those js files to your website?

The cross-domain block is probably a function of the browser to prevent such actions that basically end up as phishing sites or some other kind of nefarious hack. But it should work just fine if you put copies of the js files on your own website.

Russ
That's a lot of files and I'm interested in dealing with it programatically. Another guy suggested creating a webservice as kind of a proxy, and then just "scraping" the js file with a webrequst. what do you think of that?
Jakob
@Russ - That's a lot of files and I'm interested in dealing with it programatically. Another guy suggested creating a webservice as kind of a proxy, and then just "scraping" the js file with a webrequst. what do you think of that? –
Jakob