Lessons
-
Introduction
-
SEO
- Broken links
- Site map
- Semantic markup
- Robots.txt
- References
- Text
- Duplicates
- Basic
- Pictures
-
Speed
-
Minification
-
Minification of CSS to reduce its volume
Minification of the embedded JavaScript code of the page
Minification of the embedded CSS code of the page
Minification of images without loss of quality
Minification of JavaScript files to reduce its volume
Unused CSS code
Data optimization:Image URLs
Animated image format MP4, WEBM, SVG instead of GIF and WEBP
Unused JavaScript code
Using the WebP format in images
Too high-quality images without using compression
Suitable video bitrate
-
Reducing requests
-
An overabundance of small pictures
Grouping CSS files
Grouping JavaScript files
An overabundance of font files
Availability of end-to-end CSS, JS files
The presence of a monochrome font
Uploading duplicate files
Using JavaScript facades
Redirecting JavaScript code
Adding lazy loading
Redirect from/to www version
- Fonts
- Loading time
- Server Settings
-
Pictures
-
The original size of the image and the size of its display area
Using sprite technology
Recompressed images with artifacts
Cropping monophonic fields in images
-
The first content
-
The sequence of connecting JavaScript files
Font display mode
Setting up a pre-connection
Removing lazy loading
Long JavaScript code execution time
File upload delayed or on demand
The server is located in the same country where the users of the site live
No requests to another country that cause page loading to be blocked
-
Minification
-
Mobility
-
Screen support
-
Adapting the layout to a Full HD computer monitor
Adapting the layout for a horizontal tablet
Adapting the layout for a horizontal phone
Screenshots for the mini-report
How blocks break the page layout
Adapting the layout to an HD computer monitor
Adapting the layout for a vertical tablet
Adapting the layout for a vertical phone
- Comfort
-
Screen support
- Bugs
-
Convenience
- Social networks
- Web Application Manifest
- Favicons
- Basic
- Text readability
-
Vulnerabilities
- Encrypted connection
- Exploits
- Vulnerabilities
The original size of the image and the size of its display area
The source image file located on the server must match the size of the block in which it is displayed. If the size of the source image is larger than the displayed one, then the size of the source file can be reduced.
4k monitors and mobile devices have several screen pixels corresponding to each pixel on the page. The ratio of page pixels to screen pixels is called device pixel ratio or DRP. For example, the resolution of the Samsung Galaxy S20 phone is 3200×1440, and its page size is 800×360. Its DPR is 4.
For high-resolution screens, we recommend using images with a DPR equal to 2. Some phones are capable of displaying images with a factor of both 3 and 4 DPR. But if you use images optimized for such a DPR, then the original image files will be too large and this will slow down the page loading. Double—precision images (DPR equal to 2) are the perfect compromise.
We are testing a page on a 414 pixel screen. But smartphones range in size from 360 pixels to 430. Of course, it is impractical to make an image for each screen size, so we selected the optimal size for our verification service at 414 pixels [based on statistics] (https://gs.statcounter.com/screen-resolution-stats/mobile/worldwide ). The number of smartphones with a screen larger than 414 pixels is about 5%.
The appropriate size of the images is important for the following reasons:
- Users of 4K monitors see high-quality pictures. And this is the most solvent audience.
- Image size reduction speeds up page loading.
Read the same:
- Database of all screen resolutions [https://yesviz.com/viewport /](https://yesviz.com/viewport /). Information about your screen [https://www.mydevice.io /](https://www.mydevice.io /).
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
}
.el {
width: 200px;
}
.normal {
width: 200px;
height: 200px;
}
.blur {
width: 200px;
height: 200px;
filter: blur(1px);
}
.horizontal {
width: 200px;
height: 100px;
}
.vertical {
width: 100px;
height: 200px;
}
</style>
</head>
<body style="font-family: sans-serif;">
<h1>Пример различных деформаций изображений</h1>
<div class="grid">
<div class="el">
<div class="title">Нормальный</div>
<img src="./banana.jpg" class="normal"/>
</div>
<div class="el">
<div class="title">Низкое качество</div>
<img src="./banana.jpg" class="blur" />
</div>
<div class="el">
<div class="title">Растянуто в ширину</div>
<img src="./banana.jpg" class="horizontal" />
</div>
<div class="el">
<div class="title">Растянуто в высоту</div>
<img src="./banana.jpg" class="vertical" />
</div>
</div>
</body>
</html>