Hacker News new | ask | show | jobs
by tjoff 80 days ago
(SSG - static site generator)

I mean, it is arguably much easier to just write the HTML page and upload it with FTP and everyone can see it. I never understood why github became a popular place to host your site in the first place.

3 comments

> I never understood why github became a popular place to host your site in the first place.

Easy: it was free, it was accessible to people that couldn't spend money for a hosting provider (read: high schoolers) and didn't impose arbitrary restrictions on what you were hosting.

Back then, your options as a high school student were basically to either try and reskin a closed off platform as much as you could (Tumblr could do that, but GitHub Pages also released in the time period where platforms were cracking down on all user customization larger than "what is my avatar") or to accept that the site you wanted to publish your stuff on could disappear at any moment the sketchy hosting provider that provided you a small amount of storage determined your bandwidth costs meant upselling you on the premium plan.

GitHub didn't impose those restrictions in exchange for being a bit less interactive when it came to publishing things (so no such thing as a comment section without using Disqus or something like that, and chances are you didn't need the comments anyways so win-win) That's why it got a lot more popular than just using an FTP server.

There are multiple reasons why FTP by itself became obsolete. Some of them I can think of off the top of my head:

1) Passive mode. What is it and why do I need it? Well, you see, back in the old days, .... It took way too long for this critical "option" to become well supported and used by default.

2) Text mode. No, I don't want you to corrupt some of my files based on half-baked heuristics about what is and isn't a text file, and it doesn't make any sense to rewrite line endings anymore anyway.

3) Transport security. FTPS should have become the standard decades ago, but it still isn't to this day. If you want to actually transfer files using an FTP-like interface today, you use SFTP, which is a totally different protocol built on SSH.

Why would you say FTP is obsolete? For what it's worth, I still use it (for bulk file transfer).
chrome and firefox dropped support for it 5 years or so ago, it has had a lot of security issues over the years, was annoying over NAT, and there are better options for secure bulk transfers (sftp, rsync, etc)
I see, I assumed by ftp you also meant sftp.
Depending on your hardware (SBC), FTP can also be several times faster than SFTP for transferring files over a LAN. Though I'll admit to having used other protocols like torrents for large files that had bad transfers or other issues (low-quality connection issues causing dropped connections, etc).
TFTP is also a good choice for transferring files over trusted networks to/from underpowered devices.
Because it doesn't require you to run an HTTP server, FTP server, or install an FTP client.
Finding an HTTP+FTP server was easier than finding github. Your OS probably has a FTP client installed already, but finding another one is easier than finding and most definitely easier than learning git.

And if you already knew how to write/make HTML you'd for sure already know all of that too.

This is definitely a matter of perspective. I have had a Github account since 2010, and git comes installed on Linux and macOS.

I don't always have a server available to host an HTTP+FTP server on. Or want to pay for one, or spend time setting one up. I can trust that Github Pages will have reasonable uptime, and I won't have to monitor it at all.

> And if you already knew how to write/make HTML you'd for sure already know all of that too.

This seems unnecessarily aggressive, and I don't really understand where it's coming from.

BTW, you can absolutely host plain HTML with Github Pages. No SSG required.

> And if you already knew how to write/make HTML you'd for sure already know all of that too.

That's a completely false statement. My kid took very basic programming classes in school which covered HTML so they could build webpages, which is a fantastic instant-results method. Hooray, now the class is finished, he wants to put it on the web. Just like millions of other kids who couldn't even spell FTP.

I touched on the issues with FTP itself in another comment, but who can forget the issues with HTTP+FTP, like: modes (644 or 755? wait, what is a umask?), .htaccess, MIME mappings, "why isn't index.html working?", etc. Every place had a different httpd config and a different person you had to email to (hopefully) get it fixed.
> Finding an HTTP+FTP server was easier than finding github.

No it wasn't. Seriously, where?

There was a lot of sites that provided some cpanel-like option as long as you're ok with yourcoolname.weirdhostingname.com. I believe they all came with a filebrowser and the always present public_html folder.
It'd be nice to mention some big names here that are capable of:

a) git pull & push for updates

b) good enough CDN distribution, sometimes interactive examples/project page loads tons of files

c) good enough security promises of the entire platform/infra

d) good enough serviceable time, we do not need 99.9999SLA but better not down often

e) have generous free tier

f) great DX & UX, this one is small but small headache adds up quickly

There was geocities (now gone) and a couple of *.tk domains that would inject their ads all over your page. Neither makes a great substitute for GitHub pages these days.
Didn’t your ISP provide you with free FTP storage? The French ones did, at least.
Maybe decades ago. My current one doesn't.
I just checked, I’m not using the feature but my current ISP still offers it: https://assistance.free.fr/articles/631 (10 GB FTP storage tied to the ISP-specific e-mail address).