0

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?

Rob
  • 2,766
  • 5
  • 32
  • 39

1 Answers1

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.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
  • Ok… So that basically means it's impossible for me. Do you know if it is possible with other technologies such as Java Applets? – Rob Feb 05 '12 at 13:45
  • @Rob, AFAIK, client scripting technologies such as javascript, Flash, Java Applets, Silverlight all comply to the same origin policy restriction. There might some possibility to override those settings by using manifest files but it's not something I would recommend you venturing into. Crawling is better done on the server. – Darin Dimitrov Feb 05 '12 at 13:49