开发者

How to download js file with webclient

开发者 https://www.devze.com 2023-01-12 02:09 出处:网络
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 pro

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开发者_StackOverflow't I retrieve the exact same text from code for further processing? how can I get to download the js files from the web?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消