The problem here is the economic incentives to do it are low, but the technical barriers to solving this are genuinely getting lower and lower all the time, so at some point it will happen.
The problem here is the economic incentives to do it are low, but the technical barriers to solving this are genuinely getting lower and lower all the time, so at some point it will happen.
Some people just treat some technologies as a "this can fix anything" when really they're well suited to one task.
This is the sort of thinking that suggests using a Git based solution to sync binary files between computers - the thing even the biggest Git fanboy will admit it does poorly - handling of binary files - and someone wants to use it for that specific purpose.
It might actually be more efficient to do a single-version shallow clone than to fetch all the relevant assets with separate HTTP requests. Git already supports shallow clones, and you can already use them to clone things like Github wikis, and now you can even push from them: https://stackoverflow.com/questions/6941889/is-git-clone-dep.... A --depth 1 clone of https://github.com/kragen/500lines is 7 megabytes, although the full history is only barely larger. My phone has 400+ megabytes of RAM.
More promisingly, though, Git blobs are identified by their hashes. That means that if both my home page and your home page use Twitter Bootstrap 2.3.2, your phone only needs to download it once to render both home pages, since it can see from the blob IDs in the Git directory that it already has the relevant blobs. (Assuming it hasn't been optimistically included in the initial message response!) It doesn't have to worry that one of us might be serving up a maliciously-backdoored version in order to steal users' login cookies on the other's site. By the same token, you can accept the blobs from anyone who has a copy, who might be closer to you on the network than the origin server. Especially if, like me, you're in Argentina with a 250ms ping time to the US.
(This assumes you're using something cleverer than the standard git clone protocol, which builds a thin pack including all the objects you lack.)
So git-cloning websites to view them could actually be faster than loading them over HTTP the way we do it now, because it eliminates a lot of the unnecessary security issues that we work around with bandwidth duplication and high latency.
The only upside you actually identified there, is a reduced number of requests, which is already possible by using HTTP Keep Alive and HTTP Pipelining.
1. You can use 10MB of widely-used JavaScript and stock icons on your web page, and the browser will be able to see the page after downloading 100K instead of 10MB. HTTP keepalive and pipelining don't help at all with that.
2. There are no more broken links, so people can link to stuff that isn't hosted on their own server without fear that it will go away next year, or be redirected to more commercially remunerative content, such as linkspam. (This is conditional on them caching a copy on their own server, of course.) HTTP keepalive and pipelining don't help at all with that.
3. Resources can be cached close to you on the network without you having to trust the cache not to feed you corrupted versions of them. (You do have to trust the cache to not report you to the feds for reading an article about how to download Interstellar.) This makes a huge difference in page load time by reducing latency. Again, while HTTP keepalive and pipelining can reduce the multiple of latency, they can't reduce the latency below 2×RTT to the origin server, and practically speaking they're limited to several times that. This is especially important if you're trying to host your personal pages on a high-latency residential internet connection, and/or browsing from a high-latency country.
4. Making every website not just archivable but also forkable enables a new kind of lightweight collaboration. Well, not totally new — I mean, we're doing it now on GitHub and, in a different form, on Wikipedia.
5. Naming web pages by hash rather than by IP address or by a DNS name that maps to an IP address makes it easy to host them on dynamic IP addresses, including with transparent failover when one of them goes down for a while.
#2 is no different than mirroring content, e.g. how fireballed.org works, but over longer time.
#4 collaboration is about working on something together. Every visitor to your site is unlikely to need/want/care about collaborating on it.
#5 You're suggesting an SHA1 hash is easier to remember than a domain name? Seriously?
You ask, "You're suggesting an SHA1 hash is easier to remember than a domain name? Seriously?" Consider that if I seem to be saying something that's obviously ridiculous, even to you, then maybe you've misunderstood what I was saying, as in this case. I'm going to give you the benefit of the doubt and assume that your lack of understanding is genuine, not feigned to give you an excuse to be rude, but you were rude anyway.
I told you that is already happening in practice, without the overhead of Git.
in your example, i would not agree those two things are the same. Clicking a link that goes to a http:// url and clicking a link that goes to the same file via ftp:// i would say are reasonably similar for the end user.
you're right, i didn't read into #5 enough. so for the purposes of "easier dynamic ip hosting" you're suggesting that browsing to a sha1 hash means it can come from any computer that has a copy of it?
but nobody is going to remember hashes. so you need to use dns or similar, so say "foo.com" has a GIT record, the value of which is an sha1 hash.. but then the client needs to find somewhere to get that from... so presumably you're suggesting some kind of peer to peer system for hosting?
and all of that is somehow better than the existing model, where you simply have a DNS server that has an api to update the IP address of an A record quickly?
You've also skipped over a big issue here.. this whole concept relies on a website being nothing more than static files.
It also effectively removes the ability for the author to have any idea at all about how many people view his site.
Git is reasonably good at what it does. It has some flaws but for versioning text based content, and fostering collaborative working amongst developers/authors, its a reasonably good solution.
As a replacement for HTTP web pages, caching proxies, CDNs, parts of DNS? not so much.
If you're cloning the public repo, that still requires someone to host the website -- instead now, they are hosting the whole history of the website (or not -- they could rewrite history and just have the most current version) -- and anyone who wants to view it has to pay the cost (bandwidth/latency) to clone the repo before they can view it.
There's still a social/economic question of who pays for storage — presumably someone needs to be able to say "This data is important to me; please don't trust the rest of the Web to keep a copy," or things that nobody happens to read for a few months will be lost. So there's still "hosting". But it might be more like what EBS or Gandi provides than what Amazon EC2 or Rackspace provides.
I think distributed content-named storage (like CCN, Tahoe-LAFS, Git, etc.) solves the "distributed immutable hypertext" problem, but there are still other problems to solve: how to make things mutable (each of these three has a somewhat ad-hoc and application-specific method for this), how to do asynchronous event notification, how to establish contact between previously disconnected parties (unsolicited messages), and so on.
Think about how you'd build applications like blog comments, or email, or Google Search, on top of such a distributed content-named blob store.
Are you also assuming that Git will one day reach a point where everyday web users can use it? Because unless you're using software to abstract away the ways that one normally interacts with Git, I just don't see your average web user going anywhere near it.
Also, the security consequences of such scenario could be an issue. Organisations with huge resources have a hard time with security, how's the average person going to compete with an organised adversary.
We move now into the realm of speculation.