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
Deleting a delayed download
Delayed loading is a great technology. Her task is to speed up the site. This is done by downloading images as they become visible to the user.
Refrain from it in the following cases:
- When loading images located on the first screen. If the image is visible on the first screen, it is better to download it as early as possible. So, the page will load visually faster and the user will start exploring the content earlier, even if the download of the remaining files is in progress.
- When loading small images. These images are used as icons in the interface. It is better to place them directly in CSS or HTML code as a base64 string.
An example of how enabling delayed loading delays the display of images located on the first screen.
Demonstration
PHP code
HTML code
<?php
$mode = $_GET['mode'] ?? '';
?><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.product img {
max-width:100%;
}
.product {
position: relative;
}
.product .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>');
}
</script>
</head>
<body style="font-family: sans-serif;">
Режим: <a class="btn <?=$mode === '' ? 'active' : ''?>" href="./lazyload_remove.php">Отключённая отложенная загрузка</a> <a class="btn <?=$mode === 'enable' ? 'active' : ''?>" href="./lazyload_remove.php?mode=enable">Включённая отложенная загрузка</a>
<br />
<p>Обратите внимание на разницу во времени загрузки изображения.</p>
<div class="product">
<img src="./photo.jpg?t=<?=microtime(true)?>" <?=$mode === 'enable' ? 'loading="lazy"' : ''?> onload="endLoading(this)" />
</div>
<?php for($i = 0; $i < 100;++$i) { ?>
<script src="./10-kb-js.js?t=<?=microtime(true).'.'.$i?>"/></script>
<?php } ?>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.product img {
max-width:100%;
}
.product {
position: relative;
}
.product .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>');
}
</script>
</head>
<body style="font-family: sans-serif;">
Режим: <a class="btn active" href="./lazyload_remove.php">Отключённая отложенная загрузка</a> <a class="btn " href="./lazyload_remove.php?mode=enable">Включённая отложенная загрузка</a>
<br />
<p>Обратите внимание на разницу во времени загрузки изображения.</p>
<div class="product">
<img src="./photo.jpg?t=1772864022.7024" onload="endLoading(this)" />
</div>
<script src="./10-kb-js.js?t=1772864022.7024.0"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.1"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.2"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.3"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.4"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.5"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.6"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.7"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.8"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.9"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.10"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.11"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.12"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.13"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.14"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.15"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.16"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.17"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.18"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.19"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.20"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.21"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.22"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.23"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.24"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.25"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.26"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.27"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.28"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.29"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.30"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.31"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.32"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.33"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.34"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.35"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.36"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.37"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.38"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.39"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.40"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.41"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.42"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.43"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.44"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.45"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.46"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.47"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.48"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.49"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.50"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.51"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.52"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.53"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.54"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.55"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.56"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.57"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.58"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.59"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.60"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.61"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.62"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.63"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.64"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.65"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.66"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.67"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.68"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.69"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.70"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.71"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.72"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.73"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.74"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.75"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.76"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.77"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.78"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.79"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.80"/></script>
<script src="./10-kb-js.js?t=1772864022.7024.81"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.82"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.83"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.84"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.85"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.86"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.87"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.88"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.89"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.90"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.91"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.92"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.93"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.94"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.95"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.96"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.97"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.98"/></script>
<script src="./10-kb-js.js?t=1772864022.7025.99"/></script>
</body>
</html>