Lessons
-
Introduction
-
SEO
- Snippet's clickability in search engines
-
Indexing
-
Headings H1-H6
Images have the "alt" attribute.
The Title attribute of links
Content robots.txt
Duplicate "title"
Duplicate "description"
Human-understandable name of the picture
Rules for formatting text on a page
Micro-markup format requirements and recommendations
Validation microdata Google
Human-friendly link format
Errors in Robots.txt
The content of the site map
The site map file
Link formatting requirements
Hreflang tag
"canonical" tag
Spelling of interactive interface elements
-
Speed
-
Reduce the number of network requests
-
An overabundance of small pictures
Grouping CSS files
Grouping JavaScript files
An overabundance of font files
Redirects when uploading files
Availability of end-to-end CSS, JS files
Uploading duplicate files
Using JavaScript facades
Redirecting JavaScript code
Redirect from/to www version
Using sprite technology
The video player is connected correctly
- General assessment
- Configure the server
- Speed up the display of the first content
-
Reduce the size of graphic files
-
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
The total size of all images on the page
Font Optimization
An overabundance of monochrome icons
The presence of a monochrome font
Data optimization:Image URLs
Animated image format MP4, WEBM, SVG instead of GIF and WEBP
Cropping monophonic fields in images
Using the WebP format in images
Too high-quality images without using compression
Suitable video bitrate
Excessively large images
- Server performance
- Fix the locks
- Reduce the amount of code
-
Reduce the number of network requests
- Mobile adaptation
-
Software errors
- Code
- Mail operation
- Availability
- Server Settings
-
Convenience
- Text readability
- Interface
-
Visual defects
-
CSS files are not available for download
Images are not available for download
Beautiful page 404
Background image flickering on hover
Images when loading cause a sharp change in the structure of the page
Recompressed images with artifacts
Deformed images
- Interaction with other programs
- Image Favicon
-
Vulnerabilities
- Code
-
Server Settings
-
Uploading all page files via HTTPS
Strict-https header for increased security
Private access to service files
Encrypted IPv6 connection
Enabled error display in the north
SSL certificate validity
HTTPS Availability
Redirects to protected
Vulnerabilities of a secure SSL connection
HTTP headers for increased security
- Third-party services
Images when loading cause a sharp change in the structure of the page
Sometimes, during page loading, an image suddenly appears in an empty place, and all the blocks move down sharply or move apart to make room for the image that appears. Such twitches aesthetically look repulsive. It seems that the page "jumps" during loading.
They also load the device's processor, because the user's browser recalculates the entire page structure and positioning of elements.
To fix this, specify the image size in the width and height attributes. So, the browser learns the proportions of the image even before downloading the file itself. And set the desired maximum size on each side using CSS properties. If you use the <picture> tag, then the width and height attributes must be set for <source>.
<img src="./img.jpeg" width="600" height="600" />
<picture>
<source width="600" height="600" srcset="./img.jpeg" media="(max-width: 10024px)" />
<img />
</picture>
[Great article (eng.)](https://www.smashingmagazine.com/2020/03/setting-height-width-images-important-again /) on the topic of jumping images.
Interactive example:
<?php
if(isset($_GET['photo'])) {
usleep(500000);
header('Content-Type: image/jpeg');
echo file_get_contents('photo.jpg');
die;
}
$mode = $_GET['mode'] ?? '';
?><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
img {
max-width: 300px;
height: auto;
}
.btn {
color: #000;
display: inline-block;
margin-bottom: 5px;
text-decoration: none;
padding: 5px 10px;
border: 1px solid #000;
border-radius: 5px;
}
.btn:hover {
background-color: #ddd;
}
.btn.active {
background-color: #000;
color: #fff;
}
</style>
</head>
<body style="font-family: sans-serif;">
Режим:
<a class="btn <?=$mode === '' ? 'active' : ''?>" href="./image_jumping.php">IMG без width и height</a>
<a class="btn <?=$mode === 'img_with' ? 'active' : ''?>" href="./image_jumping.php?mode=img_with">IMG с width и height</a>
<a class="btn <?=$mode === 'picture_without' ? 'active' : ''?>" href="./image_jumping.php?mode=picture_without">PICTURE без width и height</a>
<a class="btn <?=$mode === 'picture_with' ? 'active' : ''?>" href="./image_jumping.php?mode=picture_with">PICTURE с width и height</a>
<?php
switch($mode) {
case 'img_with':?>
<h1>Заголовок страницы</h1>
<img src="./image_jumping.php?photo=true&t=<?=microtime(true)?>" width="600" height="600" />
<h2>Это подзаголовок останется на месте</h2>
<p>Этот текст также останется на месте после загрузки картинки, которое происходит через пол секунды.</p>
<?php
break;
case 'picture_without':?>
<h1>Заголовок страницы</h1>
<picture>
<source media="(max-width: 10024px)" srcset="./image_jumping.php?photo=true&t=<?=microtime(true)?>" />
<img />
</picture>
<h2>Это подзаголовок резко сдвинется</h2>
<p>Этот текст также резко сдвинется после загрузки картинки, которое происходит через пол секунды.</p>
<?php
break;
case 'picture_with':?>
<h1>Заголовок страницы</h1>
<picture>
<source media="(max-width: 10024px)" width="600" height="600" srcset="./image_jumping.php?photo=true&t=<?=microtime(true)?>" />
<img />
</picture>
<h2>Это подзаголовок останется на месте</h2>
<p>Этот текст также останется на месте после загрузки картинки, которое происходит через пол секунды.</p>
<?php
break;
default:?>
<h1>Заголовок страницы</h1>
<img src="./image_jumping.php?photo=true&t=<?=microtime(true)?>" />
<h2>Это подзаголовок резко сдвинется</h2>
<p>Этот текст также резко сдвинется после загрузки картинки, которое происходит через пол секунды.</p>
<?php
break;
}
?>
</body>
</html>