Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the considerations for using & lt;meta> code

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you what to pay attention to the use of the code, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Necessary attribute

Attribute value description contentsome text defines meta-information related to http-equiv or name attributes

Optional attribute

The attribute value description http-equivcontent-type / expire / refresh / set-cookie associates the content attribute to the HTTP header. Nameauthor / description / keywords / generator / revised / others associates the content attribute to a name. Contentsome text defines the format used to translate the value of the content attribute. SEO optimization

Reference documentation

Page keywords, each page should have a unique set of keywords that describe the content of the page.

Users may search for and accurately describe descriptive and representative keywords and phrases of the information provided on the web page. If the tagged content is too short, the search engine may not consider it relevant. In addition, the tag should not exceed 874 characters.

Page description, each web page should have a description tag that is no more than 150 characters and can accurately reflect the content of the page.

Search engine index, robotterms is a group of values separated by commas (,), usually have the following values: none,noindex,nofollow,all,index and follow. Ensure that the nofollow and noindex attribute values are used correctly.

Page redirection and refresh: the numbers in content represent the time (in seconds), that is, how much time it takes to refresh. If you add url, you will be redirected to the specified web page (the search engine can automatically detect it, and it is easy to be punished for being misled by the engine).

Other

Mobile Devic

Viewport: can optimize the display of mobile browsers. If it is not a responsive site, do not use initial-scale or disable zooming.

Most of the 4. 7-5 inch devices have a viewport width of 360 PX, a device of 5. 5 inches, a 400 PX, an iPhone 6, a 375 PX, an iPhone 6, a plus of 414px.

Width: width (numeric / device-width) (range from 200 to 101000000, default is 980pixel)

Height: height (numeric / device-height) (range from 223 to 10000)

Initial-scale: initial scale (range > 0 to 10)

Minimum-scale: the minimum scale to which users are allowed to zoom

Maximum-scale: the maximum scale to which users are allowed to zoom

User-scalable: can the user manually shrink (no,yes)

Minimal-ui: the upper and lower status bars can be minimized when the page is loaded. (deprecated)

Note that many people use initial-scale=1 on non-responsive sites, which causes the site to render at 100% width, and users need to move the page or zoom manually. If you use user-scalable=no or maximum-scale=1 with initial-scale=1, users will not be able to zoom in / out the page to see the full content.

WebApp full screen mode: camouflage app, offline application.

Hide status bar / set status bar color: takes effect only when WebApp full screen mode is turned on. The content value is default | black | black-translucent.

The title added to the home screen

Ignore digits and automatically recognize them as phone numbers

Ignore identifying mailbox

Add smart App banner Smart App Banner: tell the browser the app corresponding to this site, and display the download banner on the page

Other reference documentation

Web page related

Declarative coding

Give priority to the latest version of IE and Chrome

Browser kernel control: many domestic browsers are dual-kernel (webkit and Trident), webkit kernel high-speed browsing, IE kernel compatible web pages and old websites. Websites tagged with meta can control which kernel rendering the browser chooses. Reference documentation

The default kernel mode of domestic dual-core browsers is as follows:

1. Sogou high-speed browser, QQ Browser: IE kernel (compatibility mode)

2. 360 Speed browser, roaming browser: Webkit kernel (extreme speed mode)

Prevent browsers from accessing page content from the local computer's cache: by setting this, visitors will not be able to browse offline.

Windows 8

Site adaptation: mainly used for the correspondence of PC- mobile phone pages.

Transcoding statement: opening a web page with Baidu may transcode it (such as posting an advertisement). To avoid transcoding, add the following meta

The above is all the contents of the article "what are the points for attention in using the Code?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report