My stack is HTML+CSS
151–160 of 194 posts
Re: My stack is HTML+CSS
#152Earlier quoted context omitted.
Twitter embeds are equally bad. Ended up remaking them to output static HTML + CSS to improve perf ( https://leerob.io/tweets ).
Same, I get ~500 tweets displayed with: - No JavaScript necessary - All profile images turned into one massive sprite - Minimal payload size Here are what the tweets look like when rendered: https://umaar.com/dev-tips/feedback Here's the code to achieve that: https://github.com/umaar/better-twitter-embed
Re: My stack is HTML+CSS
#153Those poor Lighthouse scores are what you get when you put no work into refining your site's performance. This is especially true for an out-of-the-box Wordpress implementation. I have a React project with 100s across the board, but I wouldn't necessarily recommend a React implementation if high performance is key. This doesn't even touch upon the topic of good developer performance, which is just as important as a s…
The site still fails Lighthouse, including the test for "Includes front-end JavaScript libraries with known security vulnerabilities." But wait, I thought it was just HTML and CSS!
No it doesn't. Are you sure something on your system isn't injecting JavaScript (browser extension?)
Re: My stack is HTML+CSS
#154This 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…
Re: My stack is HTML+CSS
#155Sure, 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…
My article covers that: > So... if I don’t use any templating system, how do I update my header, footer or nav? Well, simply by using the ”Replace in files” feature of any good text editor. They don’t need frequent updates anyway. The benefits of using a templating system is not worth the cost of introducing the tooling it requires.
Re: My stack is HTML+CSS
#156The main issues are the ergonomics of authoring and maintaining consistency around a site. A minimal static site generator would keep internal links and boilerplate consistent. Connecting that with markdown, Org mode, or reStructured Text would help with the ergonomics. But then you lose the goal of having no necesary tools. Anyhow, if there's one general purpose tool that predates the web and will probably be around…
> A minimal static site generator would keep internal links and boilerplate consistent. Maybe not. There's an argument to be made that says you should treat a blog as a series of pages, each modeling something corresponding to what you might call a "publication event" in the real world, e.g. printing a magazine or passing around a physical memo. The consistency angle is probably overvalued (not worth its cost). When…
And, if you're just blogging, and you want to have the permanence you're talking about, you still need to ensure that all your links are properly linked, which requires some tooling.
Re: My stack is HTML+CSS
#157Comments are something I consider pretty vital to even a basic blog now. And so he's kind of missed the mark for me.
Re: My stack is HTML+CSS
#158Earlier 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
He mentions that SSGs require tooling and dependencies. And if all you need are dynamic headers and footers, just wrap those in 'php include' tags and rename the files to .php. It's still HTML and CSS that's getting rendered.
Re: My stack is HTML+CSS
#159Sure, 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…
Re: My stack is HTML+CSS
#160This 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!