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
-
Specifying default fonts
Font display mode
Setting up a pre-connection
Deleting a delayed download
File upload delayed or on demand
-
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
- 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
Setting up a pre-connection
Often sites download files from external services. These can be maps or social media widgets. Those, in turn, download data from their sources.
For example, when the Yandex map is displayed on the site, a JavaScript file is loaded https://api-maps.yandex.ru/services/constructor/1.0/js /, and that in turn requests a photo of the cards from the address https://core-renderer-tiles.maps.yandex.net. Thus, after loading the script, he spends time connecting to the site that issues photo cards.
But you can speed up the work of maps by adding a special code to the page that will create a connection to the address https://core-renderer-tiles.maps.yandex.net in advance, even before downloading the JavaScript file itself.
<link rel="preconnect" href="https://core-renderer-tiles.maps.yandex.net" crossorigin />
<link rel="dns-prefetch" href="https://core-renderer-tiles.maps.yandex.net" />
This way, you will speed up the loading of the map from a few tens to hundreds of milliseconds.
But it only makes sense if the map or social media widget is on the first screen. In all other cases, postpone loading the map until the rest of the page loads, or until the user scrolls through the page and is about to see the map.
It is worth preloading font files in order to display the text content of the page as quickly as possible. Links to font files are located in the CSS file. Does it work? fonts will be loaded only after the CSS file is loaded. But if you preload the fonts, they will be displayed immediately after loading the CSS file.This way you will speed up the text display time by several tens of milliseconds. It is done this way:
<link rel="font" href="/path/to/file.woff2" />
Demonstration of the gain in file download speed when pre-connecting:
<?php
$time = microtime(true);
if(isset($_GET['css'])) {
header('Content-Type: text/css');
echo ".image {
background-image: url(./photo.jpg?t=".$time.");
width: 200px;
height: 200px;
background-size: cover;
background-repeat: no-repeat;
}";
die;
}
$mode = $_GET['mode'] ?? '';
?><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./error.php?css=<?=$time?>" />
<?php if($mode === 'enable') { ?>
<link rel="preload" href="photo.jpg?t=<?=$time?>" as="image" />
<?php } ?>
<style>
.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>
<script>
window.addEventListener("load", (event) => {
document.querySelector('#page-load').innerHTML = 'Страница загрузилась (событие window.onload) за <b>'+(performance.now()/1000)+'с</b>.';
});
</script>
</head>
<body style="font-family: sans-serif;">
Режим: <a class="btn <?=$mode === '' ? 'active' : ''?>" href="./error.php">Предзагрузка отключена</a> <a class="btn <?=$mode === 'enable' ? 'active' : ''?>" href="./error.php?mode=enable">Предзагрузка включена</a>
<br />
<p id="page-load">Тут отобразится время загрузки страницы (вызова события window.onload)</p>
<div class="image"></div>
</body>
</html>