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
- 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
Too high-quality images without using compression
When saving JPEG and WebP images, you can specify the compression ratio from 1 to 100. The lower the compression ratio, the less the resulting file weighs. At the same time, quality is partially lost.
Pinched images with a quality of less than 70 have obvious visual defects, which is why their use is undesirable, as they look ugly and cheapen the design of the site.
But too high-quality images are also bad, as they weigh a lot, which slows down page loading.
Use a compression ratio of 90 for your JPEG and WebP images.
Demonstration of the difference in page loading time when using images with 100 and 90 quality:
Demonstration
PHP code
<?php
$mode = $_GET['mode'] ?? '';
?><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.product-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
font-size: 20px
}
.product-grid img {
width: 100%;
}
.product-grid .product {
position: relative;
}
.product-grid .time {
position: absolute;
left: 5px;
top: 5px;
background-color: #fff;
padding: 1px 4px;
}
.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>
// Функция, которая добавляет на изображение время окончания загрузки
function endLoading(el) {
var time = performance.now()/1000;
el.parentNode.insertAdjacentHTML("beforeend", '<div class="time">'+time+' с</div>');
}
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="./too_high_quality.php">Картинки 90 качество</a> <a class="btn <?=$mode === '100' ? 'active' : ''?>" href="./too_high_quality.php?mode=100">Картинки 100 качество</a>
<br />
<p id="page-load">Тут отобразится время загрузки страницы (вызова события window.onload)</p>
<div class="product-grid">
<?php for($i = 0; $i < 50;++$i) { ?>
<div class="product">
<img src="./<?=$mode === '100' ? 'photo-100.jpg' : 'photo-90.jpg'?>?t=<?=microtime(true)+$i?>" /><br />
Товар 1<br />
1000 руб.
</div>
<?php } ?>
</div>
</body>
</html>