Tutorials Page 2
How to Override width and height HTML attributes with CSS
One of the HTML elements that frequently comes into collision with CSS is the
img
element. As we learned in Request Metrics' Fixing Cumulative Layout Shift Problems on DavidWalshBlog article, providing image dimensions within theimage
tag will help to improve your website's score. But...Fixing Cumulative Layout Shift Problems on DavidWalshBlog
Over 50 thousand developers visit DavidWalshBlog every month from around the world to learn JavaScript tricks and fix problems in their code. Unfortunately, some of them have a slow experience on the site.David tracks the performance of his Core Web Vitals and overall performance with
Date.now()
Ask any software engineer and they'll tell you that coding date logic can be a nightmare. Developers need to consider timezones, weird date defaults, and platform-specific date formats. The easiest way to work with dates is to reduce the date to the most simple...
Extract a Number from a String with JavaScript
User input from HTML form fields is generally provided to JavaScript as a string. We've lived with that fact for decades but sometimes developers need to extract numbers from that string. There are multiple ways to get those numbers but let's rely on regular...
Thoughts on Streaming Services: 2024 Edition
Streaming services have revolutionized content delivery, sending linear media companies into a panic as they watch traditional cable services decay. "Cutting the cord" is a common practice these days, but the streaming landscape isn't perfect. We're a decade into streaming so I wanted to share my...
AutoGrow Textareas with CSS
As the demands of the web change and developers experiment with different user experiences, the need for more native language improvements expands. Our presentation layer, CSS, has done incredibly well in improving capabilities, even if sometimes too slow. The need for native support for automatically expanding...
How to Play Grand Poo World 3
The underground world of creating and streaming Super Mario World-based ROM hacks continues to gain popularity. This popularity is a tribute to the creativity of gamers and the quality of the original 30 year old video game's mechanics. Over the past decade, incredible ROM hacks like...
How to Get the Current Branch Name with git
Most developers spoil themselves with fun command line utilities to make their work easier and more efficient. One such command line helper allows developers to always show the git branch in the command line. How can you get the current branch? With...
AutoSave with VSCode
Visual Studio Code has taken the crown of most used text editor, at least in JavaScript spheres. VSCode is fast, feature-filled, and supports thousands of plugins to boost productivity. Developers can also tweak hundreds of settings to enrich functionality. One such feature is...
How to Detect Failed Requests via Web Extensions
One of the best things that ever happened to t he user experience of the web has been web extensions. Browsers are powerful but extensions bring a new level of functionality. Whether it's crypto wallets, media players, or other popular plugins, web extensions have...