3 ms·
I think this is a pretty awesome statement. I'm always unreasonably pleased when I see a web page that embraces appropriate simplicity. > Coding a basic vanill
by JohnFen 3y ago
I think this is a pretty awesome statement. I'm always unreasonably pleased when I see a web page that embraces appropriate simplicity.
> Coding a basic vanilla multi-page application (MPA) saves time in development (goodbye babel/postcss/SSR config) and builds are fast (this site builds in less than 1.2 seconds).
I'd hope that builds would be on the order of a small pile of milliseconds! (or zero: a site like that could just be handcoded, really).
> I'm only using these 2 lines of Javascript to add the current year in the footer copyright tag
This could also be eliminated. At least in the US, there is no legal reason to add a copyright notice at all, and you certainly don't have to add a year. Those requirements were removed years ago.
But, if all you want is the year, why not do that server-side? Or bake it into the html and set up a bit of automation to replace the year with a new one every Jan 1.
- robertoandred 3y agoThere's zero need to set up babel/postcss/SSR. Those have all been handled by frameworks for years and years.
- jallen_dot_dev 3y agoIs it even correct to automatically update the year? Shouldn't the year be whenever the work was created or revised? Which could be set at build time. Another advantage of setting it in the build is it'd show even without javascript. If I disable JS, no copyright statement at all appears on the page. So if it was really necessary to declare your copyright, then would it mean anyone who disables JS can freely infringe? I agree just leaving the copyright out of the footer would be best.
- adregan 3y agoI am of the opinion that what you are suggesting is correct. You don’t want a programmatic copyright because you want the copyright to reflect the date created as that when the right begins, and it continues from there without need for refreshing.
- terminatornet 3y agoI think it's also incorrect because it's getting the date client side. so it would just display the local client's year, not necessarily the correct one.
- beej71 3y ago> why not do that server-side? Or bake it into the html and set up a bit of automation to replace the year with a new one every Jan 1. In this case I think I'd argue that the JS solution is the most simple to implement+maintain.
- sfn42 3y agoThis is what Js is good at. It sucks for building actual systems but it's fine for small stuff