this post was submitted on 13 Feb 2024
191 points (97.0% liked)

Programming

20363 readers
134 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
all 28 comments
sorted by: hot top controversial new old
[–] mox@lemmy.sdf.org 48 points 1 year ago (1 children)

Also:

  • Simple sites allow visitors to stay safe from browser exploits by keeping scripts disabled.
  • Simple sites pose very little threat of fingerprinting or other invasive tracking techniques.
  • Simple sites can look beautiful, with a bit of well-crafted CSS.
[–] Kushan@lemmy.world 14 points 1 year ago (2 children)

I don't think your second point is correct. You can still embed analytics on a static website. I believe you're conflating it with your first point by assuming that scripts are disabled on the browser side, in which case it's a bit of a redundant point.

I also think it's a bit unrealistic in this day and age to run with scripts completely disabled. I know it sucks, but we need better ways of protecting our privacy and disabling all scripts is a bit of an extreme measure given so much of the modern web relies on it.

[–] mox@lemmy.sdf.org 3 points 1 year ago* (last edited 1 year ago)
  1. My first two points make a distinction between fingerprinting and more invasive attacks that JavaScript has enabled, including data exfiltration. You might not have encountered the latter, but that doesn't make them the same thing. (Also, the analytics you refer to that are possible without scripts are far less invasive than what scripts can do, as is hinted in my second point.)
  2. It's not unrealistic, since scripts can be turned off by default and enabled selectively when needed. (But were that not the case, it would be reason to use them less, not more.)
[–] thesystemisdown@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

I think it's impossible if you want for things to work. JavaScript is so ubiquitous it's been baked into the browser since 1995.

[–] pixxelkick@lemmy.world 33 points 1 year ago

I think the reason experienced devs tend to have minimalist websites that look like they are from the 90s, is because software devs aren't UX experts.

At a senior level at large companies, someone else designs the look and figmas to make the site be pretty. I don't do that shit.

I can do some basic stuff as a front end dev, but react has nothing to do with css animations and all the stuff you typically associate with a "pretty" website.

Reactive frameworks are just handy for updating the dom on a mutatable website (ie forms, web socket stuff, data in out, pulling data from a db)

Blogs tend to be statically generated so there should be zero reason to use reactive frameworks anyways, unless you add something dynamic like perhaps a comment box folks can login to and leave comments/likes/shares etc. Loading those comments will prolly want a framework.

Aside from that, it's mostly css to do fancy stuff.

[–] some_guy@lemmy.sdf.org 23 points 1 year ago (3 children)
[–] simonced@lemmy.one 8 points 1 year ago

what the fuck else do you want?

Lol, maybe a max-width on body at least, so I don't lose my line when reading long lines.
It's said to have narrow lines helps readeability for a reason.

Although, I agree, you don't need much to make a website that is functional.

[–] Kolanaki@yiffit.net 3 points 1 year ago* (last edited 1 year ago)

And here I am remembering when I first learned HTML and had a website that used every single random feature HTML was capable of, and more once I discovered the joys of JavaScript.

It was horrible and glorious all at once.

[–] snowe@programming.dev 18 points 1 year ago (1 children)

I've been saying this for years. My site only has a few lines of javascript. the rest is pure html and css, and it's very simple. https://tylerthrailkill.com

[–] owenfromcanada@lemmy.world 1 points 1 year ago

Same--I use a line or two of PHP to avoid duplicating common header/footer elements, but it's otherwise HTML and CSS (no JS at all).

https://owenfromcanada.com

[–] No1@aussie.zone 17 points 1 year ago* (last edited 1 year ago)

I.d rather take any website than being continuously forced to download apps, or being told to go to Facebook for some business's information.

There's 2 things a website should respect - simple do it more often -, and not doing these will earn you my wrath:

  • you should be able to at least zoom/shrink text. Some websites have things so locked down, I can never read their teeny tiny text. Fuck you ESPN. Why would you let desktop zoom, and stop it on mobile where my screen is smaller and I most need it? (I'll leave alone the original intent of the web of separating presentation from content for another day).
  • Browser Back button should take you back to the previius 'page'. I'm terrified to use it because you're really showing multiple 'pages' on 1 real page, so who knows where I'll end up.
[–] Phoenix3875@lemmy.world 15 points 1 year ago

Static websites can be beautiful and easy to use without being complex.

PG's blog and HN can definitely use some CSS tweaks. I can't remember how many times I clicked the wrong thing in HN.

On the other hand, it's easy to get reader mode/custom CSS/alt frontend working for such websites, so maybe it's alright after all.

[–] frezik@midwest.social 13 points 1 year ago

Hidden benefit: never having a cookie acceptance popover, because you don't have cookies.

[–] MonkderZweite@feddit.ch 13 points 1 year ago* (last edited 1 year ago)

For style examples, take Paul Graham's site

Nope, doesn't display nothing with no JS on mobile. While the other two examples seem to be desktop-only. You can do better with only HTML and CSS.

[–] singularity@lemmy.ml 12 points 1 year ago

I made mine with Hugo. It's super simple and looks great.

[–] stoy@lemmy.zip 11 points 1 year ago (2 children)

I have had an account on Deviantart for almost 20 years, and up untill last year I used to upload my photos to my gallery there.

However over the years it has only gotten worse, it is slow, annoying and have had features removed that I wanted.

So last year, I set up a simple menu system and started generating photo galleries in digiKam, and upload galleries there instead, and it is soo much more responsive.

The menu I wrote is built in HTML and CSS, the galleries digiKam exports for me do use Javascript but only to aid in navigating the galleries with the arrow keys, so everything loads instantly.

When I publish new galleries I do need to edit the HTML code in the menu (and one line in the gallery) but it is as easy as I can make it while still giving me some options.

[–] mox@lemmy.sdf.org 5 points 1 year ago (1 children)

The menu I wrote is built in HTML and CSS, the galleries digiKam exports for me do use Javascript but only to aid in navigating the galleries with the arrow keys, so everything loads instantly.

I love sites like this. Fully functional with plain HTML and CSS. JavaScript used only for optional enhancements. Fast, light, and trustworthy.

[–] stoy@lemmy.zip 3 points 1 year ago

Exactly, even now after half a year of using it, I am blown away by how fast it loads, and I love how I know exactly what is going on when it loads.

I even tried it on my phone, and the galleries have a responsive design, but better yet, they recognize swipes, making it easy to navigate on phones and tablets

[–] projectmoon@lemm.ee 1 points 1 year ago (1 children)

Where are you uploading galleries? Just your own HDD connected to a static website?

[–] stoy@lemmy.zip 2 points 1 year ago

Currently I borrow space on my dad's web host, he wasn't using it and was ok with me doing it.

[–] Montagge@kbin.earth 7 points 1 year ago (1 children)

All websites should strive to be like rockauto.com

[–] kurwa@lemmy.world 3 points 1 year ago

I'll counter with lingscars.com

[–] LinearArray@programming.dev 4 points 1 year ago

I love simple sites, takes less resources to load & lightweight.

[–] Omega_Haxors@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

I once went to a professional to get a website done (as my ability (read: patience) to code websites had proved inadequate) and they constantly tried to upsell me on just the most stupid bullshit. When I pointed out how a lot of moving parts just means more things that could possibly break they blew me off and acted like it was a completely unreasonable concern. Needless to say ended up using a website builder instead and despite a few small glitches it works pretty well with JS completely disabled.

EDIT: I was particularly concerned with how heavily they were leaning on JS, to the point it flat out wouldn't load at all for some users. Having JS flair is perfectly fine on the side but when you can't even get fucking text to load without it, that's a problem.

[–] henfredemars -1 points 1 year ago (1 children)

I love simple sites, but I feel that there's something to be said for design philosophy vs tooling.

Take vanilla WordPress for example. I find it relatively easy to manage static content, especially when running it in a container to categorically prevent dependency concerns. Is it overkill for a simple site? Perhaps, but does it work and is it easy to use? It's possible to use these tools to manage a mostly static, text based, minimal to no script website. The key is recognizing the value of that simplicity and providing that simple to read, simple to use experience without distractions.

WordPress will never be as simple and performant as a truly static site, but we can do a lot to cut down the cognitive load, and we should.

[–] owenfromcanada@lemmy.world 1 points 1 year ago

If you want the ease and functionality of WordPress, but you plan to have a relatively simple site, there are other CMS options that are lighter weight and easier to work with. I've used GetSimple for years with some of my sites, it's much more performant and easier to maintain. And the non-technical folks that manage content actually found it easier to use than WordPress.