What is a mata tag Basic syntax XML/HTML CodeCopy content to clipboard
The function of keyword tag is to tell search engines what the content of the website is about, so as to facilitate search engines to define and index the website. Keywords are separated by commas in English input method, and the length of keywords is generally not more than 100 characters. XML/HTML CodeCopy content to clipboard
When users search for these keywords on search engines, your website will appear in the results. However, since many cheaters (black hat SEO) used keyword stacking in the early days, search engines (Baidu) are no longer so sensitive to keywords. meta tag setting description XML/HTML CodeCopy content to clipboard
The description of the web page is very important and can be directly reflected in the search engine. For example, when you open the Baidu website and search for "Sina", you will see the following page: Meta tag to set character set XML/HTML CodeCopy content to clipboard
Common encoding formats include Chinese encoding (gbk2312) and international encoding (UTF-8). gbk2312 is Chinese encoding. If your website content is all in Chinese, use gbk2312. UTF-8 is universal for text around the international encoding (including Chinese and English). The main difference between them is that gbk2312 is specially designed for Chinese, and one Chinese character occupies 2 characters. UTF-8 is universal, and one Chinese character occupies 3 bytes. In the early days, network bandwidth resources were scarce, so using gbk2312 encoding could save bandwidth and increase the speed of opening web pages, but now our home bandwidth is 4M and above, and we completely ignore the saved bytes. XML/HTML CodeCopy content to clipboard
When we browse the web, most people have encountered garbled pages. The encoding format allows the browser to parse in a set editing format. If the encoding format is incorrect, garbled characters will appear. So I suggest using the universal UTF-8 encoding, so that all browsers around the world can display our web pages normally. Meta tag to set automatic refresh time XML/HTML CodeCopy content to clipboard
The refresh time is in seconds. For example, the forum page can only see new posts after refreshing. For pages that update quickly like this, you can add automatic refresh code to ensure that you can see the latest page. XML/HTML CodeCopy content to clipboard
Here we set the time to 3 seconds, please test it yourself. Meta tag setting automatically jumps to a new page XML/HTML CodeCopy content to clipboard
Example: XML/HTML CodeCopy content to clipboard
When the browser opens this page, it will automatically jump to the homepage of our website after 3 seconds. Meta tag setting to disable cache XML/HTML CodeCopy content to clipboard
We know that browsers have a cache mechanism, which means that when you open a web page, it will be automatically saved locally. The purpose of this is to directly call the cached files when you visit it again within a certain period of time to improve the access speed. However, for pages like forums that change from time to time, we don't want the browser to save cache files, so we can add this code. There is another use in program development. If you want to check the effect of code modifications from time to time during program debugging, you can use this code to disable browser cache. XML/HTML CodeCopy content to clipboard
|
<<: Detailed steps for deploying Microsoft Sql Server with Docker
>>: Solution to "Specialized key was too long" in MySQL
Install Install ts command globally npm install -...
This article uses examples to describe the three ...
Usually in project development, we have to deal wi...
Demand background The project is made using Vue, ...
Code Explanation 1.1 http:www.baidu.test.com defa...
The specific code is as follows: package epoint.m...
Table of contents Preface text 1. Closure 1.1 Wha...
Preface <br />In the previous article "...
background In the group, some students will ask r...
NULL and NOT NULL modifiers, DEFAULT modifier, AU...
This method was edited on February 7, 2021. The v...
introduce This article is based on React + antd t...
0. Why do we need remote development? When develo...
1. Install MySQL database on mac 1. Download MySQ...