DEV Community

Serhii
Serhii

Posted on

1 1

Tips I discovered this week (for web developers)

Lazy image loading

In case you need to postpone image loading. For example, you have a page that has a list of 10+ images, let's say you describe the details of your recent travel in a blog. When your reader wants to read the article, 10+ images definitely will affect a page loading time.
You can write a logic by yourself, using Intersection Observer API, as well as using ready-made solutions.
But Chrome 75+ has native support for loading attribute:

<img src="travel.jpg" loading="lazy" alt="Paris castle" />
Enter fullscreen mode Exit fullscreen mode

That means, loading="lazy" will defer image loading until it become visible on the screen.
Blog post from Lighthouse team

Performance audit in the CI process

The Lighthouse team has introduced a tool that can audit every commit for performance, accessibility issues. Try their online auditing tool if you haven't yet.

Puppeteer

A tool can automate many things you do manually, for example:

  • generate screenshots of websites, saving a page as PDF;
  • automate UI testing by providing API to make mouse clicks, form submissions, dealing with inputs, etc.;
  • crawl SPAs;
  • test Chrome extensions;

Pre-loading links

Quicklink pre-loads links in a browser idle time when a link becomes reachable for the user. The tool also verifies whether a user has a slow connection, if so - it will not pre-load a link.

Packages

city-roads

It visualizes all city roads in a particular city, uses OpenStreetMap, renders hand-written like city paths. Source

OpenLayers

One more package to render maps, easy to customize. Source

SurveyJS custom survey software

Build Your Own Forms without Manual Coding

SurveyJS UI libraries let you build a JSON-based form management system that integrates with any backend, giving you full control over your data with no user limits. Includes support for custom question types, skip logic, an integrated CSS editor, PDF export, real-time analytics, and more.

Learn more

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay