Is there any javascript (and client-side) wget implementation?

感情迁移 提交于 2020-01-06 09:03:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!