简体   繁体   English

是否有任何JavaScript(和客户端)wget实现?

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

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. 目前,我正在服务器上使用wget进行此操作,但是这会带来很多负载,因此我希望将该部分移至客户端。

Does an implementation of wget exists in Javascript? Javascript中是否存在wget的实现?

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. 我知道Js中存在一些压缩库(例如zip.js ),但是我找不到wget的对应库。 Do you know something similar? 你知道类似的东西吗?

Does an implementation of wget exists in Javascript? Javascript中是否存在wget的实现?

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. 如果内容位于您的域上,并且您没有违反安全策略,则可以使用AJAX。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM