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
-
The sequence of connecting JavaScript files
Adding lazy loading
Long JavaScript code execution time
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
Blocking files
- 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
No requests to another country that cause page loading to be blocked
The further away the servers are from the user, the more time it will take for the signal to travel the distance back and forth. This delay is called ping and depends on the distance, the number of hops (the number of routers between the user and the site), as well as the route of network packets.
If you use foreign services such as counters, card APIs, authorization systems, payment systems, CDN services, captchas, etc., then make sure that the connection of these scripts is non-blocking. Otherwise, such services slow down page loading due to high latency (ping) during loading.
Enable the service in the JavaScript function in the ready event.
An example in jQuery:
$(document).ready(function () {
var script = document.createElement("script");
script.src = "https://example.com/script.js"; // path to your file
document.head.appendChild(script);
});
Example in native JavaScript:
window.addEventListener('load', function() {
var script = document.createElement("script");
script.src = "https://example.com/script.js"; // path to your file
document.head.appendChild(script);
});
Demonstration of the difference in the download time of a file located in different countries:
<?php
if(isset($_GET['location'])) {
switch($_GET['location']) {
case 'ger':
usleep(55000);
break;
case 'us':
usleep(150000);
break;
case 'sing':
usleep(190000);
break;
default:
break;
}
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>
.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>');
}
</script>
</head>
<body style="font-family: sans-serif;">
<a class="btn" href="./external_block_request.php">Обновить страницу</a><br /><br />
<div class="product-grid">
<div class="product">
<img src="./external_block_request.php?location=default" onload="endLoading(this)" /><br />
Обычный пинг
</div>
<div class="product">
<img src="./external_block_request.php?location=ger" onload="endLoading(this)" /><br />
Германия
</div>
<div class="product">
<img src="./external_block_request.php?location=us" onload="endLoading(this)" /><br />
США
</div>
<div class="product">
<img src="./external_block_request.php?location=sing" onload="endLoading(this)" /><br />
Сингапур
</div>
</div>
</body>
</html>
<!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>');
}
</script>
</head>
<body style="font-family: sans-serif;">
<a class="btn" href="./external_block_request.php">Обновить страницу</a><br /><br />
<div class="product-grid">
<div class="product">
<img src="./external_block_request.php?location=default" onload="endLoading(this)" /><br />
Обычный пинг
</div>
<div class="product">
<img src="./external_block_request.php?location=ger" onload="endLoading(this)" /><br />
Германия
</div>
<div class="product">
<img src="./external_block_request.php?location=us" onload="endLoading(this)" /><br />
США
</div>
<div class="product">
<img src="./external_block_request.php?location=sing" onload="endLoading(this)" /><br />
Сингапур
</div>
</div>
</body>
</html>