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
Using sprite technology
A sprite is a large image containing dozens of small ones. A sprite is created by placing all the icons on one picture, similar to sticking stickers on a blackboard. This was done in order to reduce the number of requests to the server and speed up page loading. 30 images of 2 kilobytes are loaded many times slower than one group image of 60 kilobytes in size.
The sprite is used as follows: the background of the HTML element indicates a sprite image, and then this background is shifted so that only a certain icon is visible in the picture.
But this technology has a number of drawbacks:
- Sprite is difficult to support. Positioning a sprite as a background requires the programmer to be more careful.
- The sprite is more difficult to optimize for several different device sizes and screens. You may need to make copies of images in different sizes so that the icons look good on all screens.
Compare the result and the source code of the sprite technology and the data URL:
Demonstration
HTML code
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.bg-envelope {
width: 64px; height: 64px;
background: url('css_sprites.png') -4px -4px;
}
.bg-user {
width: 64px; height: 64px;
background: url('css_sprites.png') -76px -4px;
}
.bg-search {
width: 64px; height: 64px;
background: url('css_sprites.png') -4px -76px;
}
[class^="svg-"],
[class*=" svg-"] {
width: 40px;
height: 40px;
}
.svg-envelope {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 1H5a5.006 5.006 0 0 0-5 5v12a5.006 5.006 0 0 0 5 5h14a5.006 5.006 0 0 0 5-5V6a5.006 5.006 0 0 0-5-5ZM5 3h14a3 3 0 0 1 2.78 1.887l-7.658 7.659a3.007 3.007 0 0 1-4.244 0L2.22 4.887A3 3 0 0 1 5 3Zm14 18H5a3 3 0 0 1-3-3V7.5l6.464 6.46a5.007 5.007 0 0 0 7.072 0L22 7.5V18a3 3 0 0 1-3 3Z'/%3E%3C/svg%3E");
}
.svg-user {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a6 6 0 1 0-6-6 6.006 6.006 0 0 0 6 6Zm0-10a4 4 0 1 1-4 4 4 4 0 0 1 4-4ZM12 14a9.01 9.01 0 0 0-9 9 1 1 0 0 0 2 0 7 7 0 0 1 14 0 1 1 0 0 0 2 0 9.01 9.01 0 0 0-9-9Z'/%3E%3C/svg%3E");
}
.svg-search {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m23.707 22.293-5.969-5.969a10.016 10.016 0 1 0-1.414 1.414l5.969 5.969a1 1 0 0 0 1.414-1.414ZM10 18a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8Z'/%3E%3C/svg%3E");
}
</style>
</head>
<body style="font-family: sans-serif;">
<p>Спрайтовые кнопки. Размер фиксированный 64 пикселя.</p>
<div class="bg-envelope"></div>
<div class="bg-user"></div>
<div class="bg-search"></div>
<p>Data URL кнопки. Размер резиновый.</p>
<div class="svg-envelope"></div>
<div class="svg-user"></div>
<div class="svg-search"></div>
</body>
</html>