Lessons
-
Introduction
-
SEO
- Snippet CTR
-
Indexing
-
Headings H1-H6
Images have the alt attribute.
The Title attribute of links
Splitting the page into HTML5 sections
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
-
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
-
Caching
-
304 response code when checking the operation of caching
ETag header for caching operation
The "Expires" header for caching to work
- Showing the first content
-
File size
-
Minification of CSS to reduce its volume
Server GZip compression function
Minification of the embedded JavaScript code of the page
Acceptable size of the HTML code of the page
Minification of the embedded CSS code of the page
Minification of images without loss of quality
Minification of JavaScript files to reduce its volume
The total size of all images on the page
Unused CSS code
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
Unused JavaScript code
Cropping monophonic fields in images
Using the WebP format in images
Too high-quality images without using compression
Suitable video bitrate
Excessively large images
-
Slow files
-
HTML code generation time
Title "Keep alive"
Optimal time to download files from the server
Using the modern HTTP2 protocol to speed up the site
Adding lazy loading
Long JavaScript code execution time
Time to download files from the server under load
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
-
Number of network requests
-
Mobile adaptation
- Broken layout
- Compliance with guidelines
-
Software errors
- Code
- Mail operation
- Availability
- Server software
-
UX User Experience
- Text readability
- Logic and convenience of the interface
- Visual defects
-
Integration with programs
-
Phones without a clickable link to start a call quickly
Links for Email addresses
Manifest validation.json with a list of favicons
Snippets of the site when sending links in social networks and instant messengers
Tag for specifying a large favicon
The BrowserConfig file
Apple touch bar icon for Mackbook pro
Favicon.ico file
-
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 software
The "Expires" header for caching to work
The page consists of dozens of files, and 95% of the files can be shared by all pages of the site. Caching was invented to avoid downloading this information every time.
There are 3 caching mechanisms:
- The “cache-control” or “expires” headers indicate how long the content will be relevant. During this time, the user’s browser uses the saved copy of the file and does not make any requests to the server.
- Caching via “etag”. The server generates a unique string based on the content and the user’s browser asks each time if the file has changed and provides this string.
- The title is “Last-Modified”. The server reports the date of the last file change, and the browser asks each time if the file has changed since that time.
If the server does not use the “cache-control” or “expires” headers when transferring files, the browser will send a request to download files or check the cache by “etag” or “Last-Modified” every time the page is visited. This will slow down the page loading speed.
Instruction [How to set up caching] (/blog/11).
Demonstration of page loading speed with caching enabled and disabled:
Demonstration
PHP code
HTML code
<?php
if(isset($_GET['img'])) {
header('Content-Type: image/jpeg');
echo file_get_contents('photo.jpg');
die;
}
?><!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.example {
display: flex;
}
.img {
position: relative;
}
img {
width: 250px;
}
.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="./cache_time_header.php">Обновить страницу</a><br /><br />
<div class="example">
<div class="element">
Кеширование отключено<br />
<div class="img">
<img src="./cache_time_header.php?img=1" onload="endLoading(this)" />
</div>
</div>
<div class="element">
Кеширование работает<br />
<div class="img">
<img src="./photo.jpg" onload="endLoading(this)" />
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.example {
display: flex;
}
.img {
position: relative;
}
img {
width: 250px;
}
.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="./cache_time_header.php">Обновить страницу</a><br /><br />
<div class="example">
<div class="element">
Кеширование отключено<br />
<div class="img">
<img src="./cache_time_header.php?img=1" onload="endLoading(this)" />
</div>
</div>
<div class="element">
Кеширование работает<br />
<div class="img">
<img src="./photo.jpg" onload="endLoading(this)" />
</div>
</div>
</div>
</body>
</html>