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
Today someone talked to me about a website develo...
Implementing process analysis (1) How to call rep...
According to data analysis company Net Market Sha...
This article example shares the specific code of ...
First, the server environment information: Reason...
Table of contents mysql log files binlog Binlog l...
The Docker container provides services and listen...
MySQL handles GROUP BY and DISTINCT queries simil...
1. Current date select DATE_SUB(curdate(),INTERVA...
In the previous article, we introduced how to for...
How to indicate the parent directory ../ represent...
Browser compatibility is nothing more than style ...
This article shares with you how to query the sta...
In this post, we’ll use the :placeholder-shown ps...
This article example shares the specific code of ...