Live data from Hacker News

My stack is HTML+CSS

blog.steren.fr

141–150 of 194 posts

Re: My stack is HTML+CSS

#142

Earlier quoted context omitted.

To be fair, static site generators are a thing and are very much underused in cooperations. He could have the same scores/performance and still get the full advantages you mentioned. But yes, handcrafting html is pointless at some point, especially if you have to update the contents every so often

"I looked at static site generators like Jekyll, Hugo, 11ty, but all of these require tooling installed, have a build step and will ultimately need some updates or be abandoned by their maintainer." - from the article

Yes and to that point you could use something like Hugo, generate a static HTML site. Then with that static site in HTML/CSS you are no worse off the solution the author proposes even if that generator became completely abandoned and unusable the next day. But in the meantime your work would be a LOT easier if you are doing anything at all with headers/menus/accessibility

Re: My stack is HTML+CSS

#143
post #49
post #46

Earlier quoted context omitted.

> Vanilla ` ` will ship the same image to every device, regardless of viewport size. You can have responsive images with vanilla [0]. You can even lazy load images with just `loading="lazy"` attribute[1]. I'm pretty sure I can optimize more things. I'm mostly agree with this blog post. Plain HTML+CSS is really good for simple webpages, like landing page or portfolio that requires less update. But for a blog with pagi…

The point is that "just HTML+CSS" is not the recipe for performance. You get into the same nuance as any other technology: how you use HTML+CSS is the recipe for performance. In fact, his image in this blog post doesn't have `width` and `height` set, so had it been higher up on the page and part of the "Largest Contentful Paint", not sure we'd have a 100 here. This is where frameworks can be really helpful, and I wou…

JS frameworks are for noobs. HTML+CSS is the way. https://saber.datasilk.io

Re: My stack is HTML+CSS

#144
post #21

This is an inaccurate over-simplification. If you just use HTML and CSS, you can also have really bad Lighthouse scores. For example, vanilla ` ` will ship the same image to every device, regardless of viewport size. Vanilla ` ` doesn't enforce setting `width` and `height`, which makes your layouts shift. Slow-loading images and layout shifts are the very things that will downgrade the "100" score he's currently prou…

Back in the day you sized your image for the web, there was no need for dimensions in img tags > For example, vanilla ` ` will ship the same image to every device, As it should be, for simplicity's sake. Designers trying to assert pixel-perfect control of layout is part of why the web sucks so much today. Let the browser handle layout, that is one of the things it is designed to do!

Designers trying to assert pixel-perfect control of layout is part of why the web sucks so much today.

Sending a high resolution image to a user with a low pixel density display is wasting their bandwidth and battery. Sending a low resolution image to a user with a high pixel density display isn't giving them the good experience they paid for when they bought a high end device.

Optimization is about giving all the users the best experience you can on a website. It doesn't necessarily change the design at all.

Re: My stack is HTML+CSS

#145

Earlier quoted context omitted.

Back in the day you sized your image for the web, there was no need for dimensions in img tags > For example, vanilla ` ` will ship the same image to every device, As it should be, for simplicity's sake. Designers trying to assert pixel-perfect control of layout is part of why the web sucks so much today. Let the browser handle layout, that is one of the things it is designed to do!

Well on my low latency nordic cellphone connection, it's always nice to receive a lower resolution image. Especially if I don't have the resolution to display it

It would be good if more browsers and websites implemented the prefer- reduced-data setting that Chrome and Edge have right now, but you do have that option in Chrome for Android right now. https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

Re: My stack is HTML+CSS

#147
post #66

Sure, it's super easy when your page doesn't have even a header and/or a footer. Try having a top-menu in your design, or some banners/ads, and then you need to change ALL the pages to change a single url. This is how we used to do things long time ago, and it sucked BIG TIME, and that's why people invented server-side includes and cgi and mod_php and all of that... it saves time, and your time costs much more than h…

Back in the old days of web development in 1999 there was a great app called Adobe Pagemill for making changes across thousands of HTML pages. It was great.

These days you can do the same thing with about 5 lines of Python.

Re: My stack is HTML+CSS

#148
I am pro github pages. Used it for 5 years, no complaints. [1]

However, I've chosen to also use Jekyll. Github pages explicitly supports/couples with Jekyll [2], so I view the combination as a single dependency as opposed to an extra. For deployment, I push to a git branch and github builds and updates my site in the 10-60 second time frame.

[1] http://www.growthalytics.com/programming/2015/07/19/setting-...

[2] https://docs.github.com/en/free-pro-team@latest/github/worki...

Re: My stack is HTML+CSS

#149
This is almost my stack, but I added PHP for rendering Markdown files (via Parsedown) and use include statements for common components like headers. I use an Apache server on a 512mb VPS and deploy by ssh and a git pull.

The only downside I have notice is that I can't easily put JS demos _within_ my rendered markdown, but I can work around it by stitching together multiple markdown files. Not pretty, but it works.

Re: My stack is HTML+CSS

#150
post #46
post #21

This is an inaccurate over-simplification. If you just use HTML and CSS, you can also have really bad Lighthouse scores. For example, vanilla ` ` will ship the same image to every device, regardless of viewport size. Vanilla ` ` doesn't enforce setting `width` and `height`, which makes your layouts shift. Slow-loading images and layout shifts are the very things that will downgrade the "100" score he's currently prou…

> Vanilla ` ` will ship the same image to every device, regardless of viewport size. You can have responsive images with vanilla [0]. You can even lazy load images with just `loading="lazy"` attribute[1]. I'm pretty sure I can optimize more things. I'm mostly agree with this blog post. Plain HTML+CSS is really good for simple webpages, like landing page or portfolio that requires less update. But for a blog with pagi…

[deleted]
Post reply on HN