zoukankan      html  css  js  c++  java
  • 用浏览器模拟各种User Agent

    测试页面的时候经常需要不同的User Agent,Firefox、Chrome浏览器就可以完美的模拟出各种User Agent。User Agent Switch  这个插件就可以帮上大忙,chrome和firefox都有这个插件。
    先安装User-Agent Switcher插件,然后点选项,在Custom User-Agent List里加入各种User Agent 。
    比如 iPad:
    iPhone 3.0   
    Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
    Apple Computer, Inc.
    ipad
    还有一种方法,WINDOWS电脑安装有chrome的话,只要 “开始-运行”这些就OK。
    谷歌Android:
    chrome.exe –user-agent=”Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1″
    苹果iPhone:
    chrome.exe –user-agent=”Mozilla/5.0 (iPad; U; CPU OS 3_2_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B500 Safari/531.21.10″
    苹果iPad:
    chrome.exe –user-agent=”Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16″
    诺基亚N97:
    chrome.exe –user-agent=”Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124″
    其他各种手机各种浏览器的User Agent见这里:
    http://www.zytrax.com/tech/web/mobile_ids.html
  • 相关阅读:
    linux下QT程序输出乱码解决方法
    Qt中新建类构造函数的初始化参数列表
    移植tslib1.4至mini2440
    Linux中总线设备驱动模型及平台设备驱动实例
    igntie实现数据同步
    django-初始化举例
    django-总体
    django-admin层
    django-view层
    django-template层
  • 原文地址:https://www.cnblogs.com/top5/p/2540686.html
Copyright © 2011-2022 走看看