Clientless BitTorrent downloads in your browser, using Javascript

BitTorrent Labs have released the alpha version of their "OneClick Chrome Extension," a Javascript-based Web app that obviates the need for a separate BitTorrent client. Using their plugin, you can download BitTorrent files as though they were regular, server-hosted downloads. As Patrick Williams explains in a blog post on GitHub,

I stumbled upon the Chrome Extension webRequest api that gives you access to all the http headers for requests in Chrome. Which meant that not only could I filter for .torrent file requests, but I could go one step farther and just wait for a server to serve up a file with the application/x-bittorrent mime type before springing into action. I immediately slowed my ascent up Balmers peek, declined the co-worker invite to Zeitgeist (apparently it was quite the evening), and dove in.

Writing Chome extensions is actually fairly simple. Despite my failure to deliver on the foolishly bold claim I made to Art, saying that I’d have OneClick rewritten as a extension before he left for the day, it really wasn’t too much work. Their getting started page is really precise, and their documentation and examples are really thorough, especially for webRequests.

OneClick Chrome Extension (via Engadget)


  1. How great would a website allowing you to do this be? Just input your magnetlink and and some local javascript starts chewing. I guess the saving the data to your computer would be a problem.

  2. The real issue is probably the fact that the torrent downloads aren’t done with JS. They’re done by native code. And the standards for p2p in the browser haven’t been finished. So we can’t built this with pure web apis yet.

    Btw, on magnet links though. If we ‘could’ build this you could already do even better than ‘just’ having people input magnet links into a site. Using registerProtocolHandler you could register your site as a handler for all “magnet://” links and have the browser open up your web app whenever the user clicks on a magnet link on the web.

  3. Okay, so this means your browser has to stay open the entire time the torrent is downloading, right? The memory hog that is Chrome. I don’t think so. uTorrent works great and uses very little memory. This seems like a solution in search of a problem.

    1. Here are some problems that this solution solves: 
      1. Downloading torrents on ChromeOS (HUGE help)
      2. Downloading torrents even when you don’t have admin permissions to install applications

      1. I’d solve both those problems with a seedbox, but okay, I can see most people in those situations could use this.

        It would also be good for the clueless who have no idea what bittorrent even is, and had no idea they needed another program to download those files, assuming this was baked-in to Chrome.

      2. If you don’t have admin permissions, chances are you’re in a controlled environment that doesn’t allow any p2p anyway. At that point you need further countermeasures that a streamlined experience like this is just unlikely to have.

        Agree on chromeOS.

    2. Different strokes for different folks; I keep Chrome open with dozens of tabs across several browser windows for weeks on end and there’s no memory issue (OS X). Firefox on the other hand slows my computer to a crawl immediately

      If I didn’t have a separate linux machine to handle file serving and torrents, in-Chrome bittorrent would be fine for me even for large files that require leaving the browser open (again, since I do that anyway with no issue). I agree that for heavy bittorrent users it’s superfluous but there are plenty of uses. 

      Even in my case, with a second computer used for downloading, if I want to download something small on my main computer (which depending on the source can take mere seconds) it would be a lot easier to do it this way than to bother to open a separate torrent program.

      1. You know it’s interesting. I’m on OSX too, Snow Leopard. Chrome often goes through a GB and a half in less than 12 hours with a dozen tabs. Each “rendering instance” anywhere from 80 to 150 MB with no memory turnover. That is the circumstance, most of the time, and the sluggishness means Chrome has to be quit.

        But then, go figure, there will be rarer sessions, where it eats memory but goes for days because the memory is regularly released on demand, with almost no beachballs.

        I really wish there was a way to track down what causes poor performance and somehow avoid it.

        For the record, the champ browser in terms of memory usage (generally within 1GB), overall perkiness and uptime length regularly of 2-4 weeks with over a thousand tabs created and eliminated is – CAMINO.

        1. Yeah this has always been interesting. People with essentially the same setups report wildly different performance. Of course, though my MBP is two years old I am on Lion – I had always used Firefox before updating with no issue (and had been using it since 2002 or 2003 and had no reason to switch), and now on Lion I can’t use Firefox so I switched to Chrome. Before switching to Chrome I took the step of updating to 8 GB of RAM (I had 4 initially), but that didn’t help.

          Actually, I use Safari to read BoingBoing now because I can’t login to Disqus with Chrome ;)

          Anyway, this is frustrating because the browser developers can’t test every setup. There are lots of complaints about Firefox’s memory management issues (in OS X and everywhere else) but the developers always claim the issue doesn’t exist and won’t do anything about it. I didn’t pay much attention to it until it started being a problem for me so I guess I can’t blame them, it’s just annoying. 

          I’ve grown to like Chrome anyway and don’t really desire to go back to Firefox. But on your suggestion I might give Camino a try, I’ve heard of it but never tried it.

    3. This specific plugin isn’t really interesting; the interesting part is that Bittorrent Labs is bringing the technology to browsers and making it accessible to web developers, so that they can design apps that use it.

      They have a sample called Paddle Over which lets people send files to each other over Bittorrent without having to do anything but select a file and send an URL. This can be very useful for making these kinds of applications faster (since they don’t have to bounce off the server), cheaper (no bandwidth costs for the service), more secure (governments can’t demand a copy if the service never had one), etc.


  4. Opera has had this for years, and they actually removed it recently. It just doesn’t solve a real pain point: people who know or need bittorrent already have dedicated, superior solutions; other people simply don’t care.

    It can be useful in some very small niches (chromeOS), but it brings further complication: when using something like this, are you then seeding as long as the browser is open? Or are you not seeding at all? Seeding makes a huge difference for most users with asymmetrical downstream/upstream capabilities.

    1.  Thank you for this comment, mostly because I was sure Opera had this capability years ago, but had started to think I’d imagined it.

Comments are closed.