问题
In order to provide a service for webmasters, I need to download the public part of their site. I'm currently doing it using wget on my server, but it introduce a lot of load, and I'd like to move that part to the client side.
Does an implementation of wget exists in Javascript?
If it exists, I could zip the files and send them to my server for processing, that would allow me to concentrate on the core business for my app.
I know some compression library exists in Js (such as zip.js), but I was unable to find the wget counterpart. Do you know something similar?
回答1:
Does an implementation of wget exists in Javascript?
I doubt it due to the same origin policy restriction built-in browsers which prevents you from fetching contents located on other domains. If the contents is located on your domain and you are not violating the security policy you could use AJAX.
来源:https://stackoverflow.com/questions/9149672/is-there-any-javascript-and-client-side-wget-implementation