1. TKD Optimization (Title, keyword, Description)

1. Use different title, keyword, and description for different HTML pages

2. Add multi-terminal description of the website, for example, add mobile terminal description in PC terminal

  // TKD      
title: this.indexInfo.tkdVO ? this.indexInfo.tkdVO.tkdTitle : 'xxx',      
meta: [        
   { name: 'description',content: this.indexInfo.tkdVO ? this.indexInfo.tkdVO.tkdDescription : 'xxx' },       
   { name: 'keywords',content: this.indexInfo.tkdVO ? this.indexInfo.tkdVO.tkdKeywords : 'xxx'},        
   { name: 'applicable-device', content: 'pc' },        
   { 'http-equiv': 'Cache-Control', content: 'no-transform' },        
   { 'http-equiv': 'Cache-Control', content: 'no-siteapp' },        
   { name: 'mobile-agent',content: ` format=wml;url=https://h5.xxx.com `},        
   { name: 'mobile-agent',content: ` format=xhtml;url=https://h5.xxx.com `},           { name: 'mobile-agent',content: ` format=html5;url=https://h5.xxx.com `}]
Copy the code

Second, minimize unnecessary 301, 302, 304 redirects to the website

It may result in:

Baidu spider crawl frequency gradually reduced.

② New content pages, slow collection, even the site is not included.

(3) The ranking of keywords gradually declined steadily.

HTML a tag rel = ‘nofollow’ attribute

For website SEO optimization, rel= “nofollow” everyone is not too strange, especially many webmasters in the exchange of friendship links with other websites, one of the important indicators is that friendship links can not have nofollow.

Nofollow is the attribute value of an HTML tag, which has come to be known with the rise of search engine optimization (SEO), telling search engines not to follow a link on a page or a specific link. If web page A has A link to web page B, but Web page A adds rel= “nofollow” to the link, the search engine does not count web page A as A backlink to web page B. Search engines that see this tag may reduce or remove the link’s voting weight altogether.

Use mid-tier server cache to improve access efficiency

The node middleware LRU is used to set up the cache in the node middle tier

# install lru const lru = require('lru'); const cache = new LRU(2), evicted cache.on('evict',function(data) { evicted = data }); cache.set('foo', 'bar'); cache.get('foo'); //=> barCopy the code

Use HTTP gzip compression to reduce the transfer size of resources

Because the environment of our project is placed on Ali Cloud, we can use the compression function of Ali Cloud for Gzip compression of CSS and JS resource files