i was thinking it would be cool to implement native torrent support in a web browser so that the following html would render an image on the page:
<img src="magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C" alt="smiley face" height="42" width="42">
i have looked around and such a thing doesn’t appear to have been done before, but it seems to me that it would have a lot of advantages – for example in content delivery networks, or to provide redundancy when hosting files.
could such functionality be implemented as a browser plugin, or is there a better way? what steps would be required?
4
The idea is feasible, but of little use due to the nature of web browsing and bittorrent behaviour.
For small resources, e.g. images, the overhead of setting up a swarm and keeping it reliably seeded is way too big compared to just serving the image directly from some server.
For large resources, e.g. long video elements, it would be justified, but then you would want to stream the content so that the user has something to see right away, not download-and-play. (It’s a web browser, after all, not a download utility.) But BT doesn’t offer any guarantee that you receive the first part of a file first, so it can’t reliably stream anything. I suspect this is why others haven’t run with the idea yet.
5