![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Nginx
阿諾同學
www.iarno.cn
展开
-
nginx识别Ua来区分浏览器
通常会用JS,PHP来判断Ua中字符串来识别浏览器。今天介绍用NGINX中$http_user_agent来判断;location / { root /usr/local/website/web; if ( $http_user_agent ~ "(MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(O...转载 2018-07-16 16:52:41 · 8629 阅读 · 0 评论 -
服务端渲染实现SEO优化
如果进行了前后端分离,那么前端就是通过js来修改dom使得html拼接完全,然后再显示,或者是使用SPA,这样,seo几乎没有。那么这种情况下如何做seo优化呢? 我们可以自行提交sitemap,让蜘蛛主动去爬取,但是遇到了sitemap中的url,达到指定页面之后只有元js怎么办呢?这是我们可以使用<noscript>标签来进行简单的优化,比如打印出当前页面信息的一些关键的信...转载 2018-07-17 18:55:58 · 3491 阅读 · 0 评论 -
导致nginx日志中request_time过大的原因
tcp传输,如果分包时,每个tcp包大约1400字节,之前那个请求响应body有1500K左右,要分成100多个tcp包。tcp有个慢启动过程,起初每次发送10个包,之后再根据网络情况调整每次发包数量,假设网络不好,就得分10次发送。然后由于tcp是可靠传输,需要确保每个包对方都收到了(通过给每个包编序号,以及接收对方发送的ack实现),如果在约定时间内没收到对方发的ack会重传该包。此外,...原创 2018-09-04 23:21:37 · 7745 阅读 · 0 评论 -
nginx优化之request_time 和upstream_response_time差别
1、request_time官网描述:request processing time in seconds with a milliseconds resolution; time elapsed between the first bytes were read from the client and the log write after the last bytes were sent ...转载 2018-09-03 23:27:00 · 3871 阅读 · 0 评论