不同瀏覽器訪問出現不同的Request.Headers["Accept"]值
廣告:
不同瀏覽器訪問出現不同的Request.Headers["Accept"]值
PreferredRenderingMime 為首選的text/html
百度蜘蛛(baiduspider)訪問出現的Accept值:
Request.Browser.PreferredRenderingMime:text/html
useragent:mozilla/5.0 (compatible; baiduspider/2.0;+http://www.baidu.com/search/spider.html)
Request.Headers["Accept"]:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
手機瀏覽器訪問出現的Accept值
Request.Browser.PreferredRenderingMime:text/html
Request.Headers["Accept"]:
text/vnd.wap.wml,text/html,application/vnd.wap.xhtml+xml,application/xhtml+xml
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
win8手機:Opera瀏覽器
Request.Browser.PreferredRenderingMime:text/html
useragent:opera/9.80 (windows nt 6.2; u; en) presto/2.10.289 version/12.02
Request.Headers["Accept"]:image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
廣告: