当前位置:网站首页>How to browse mobile web pages on your computer
How to browse mobile web pages on your computer
2022-06-30 15:34:00 【But the teacher】
List of articles
background
With the increasing popularity of mobile phones , There are more and more things for mobile phone development , It even started to support only mobile phones . For example, one of our landing pages , it Mobile phones are preferred Input clues , Very unfriendly to computers . This is the time to deal with , The realization of using the computer to access the mobile phone web page as if it were a mobile phone
resolvent
In fact, the computer can directly simulate the mobile terminal
Preparation tools
Required materials
- The website you want to visit Url
- Suppose this time it is
https://cn.bing.com/
- Suppose this time it is
- Google Chrome browser
- A computer (Mac perhaps PC)
operation
1 visit Url
Turn on the computer Chrome browser , visit https://cn.bing.com/
2 Open browser developer tools
Dot >> More tools >> Developer tools 
3 Switch phone mode
The top left corner of the pop-up menu Next to the mouse style There's a cell phone / Computer style switch button 
Point him Then press F5 Or click refresh page
Then you will find that you have entered the mobile mode page 
You can also adjust the model Pixels Horizontal and vertical screens, etc
This is the time , Pages specially adapted to the mobile phone , You can operate on the computer
summary
The principle of computer and mobile access is the same
Both the computer and the mobile phone send requests to the server , Just like you wear different clothes , Maybe they wear short sleeves in summer , Down jacket in winter , But whatever you wear , You have to go out to work . Maybe you took the subway last time , Take the bus this time , Next time, prepare to drip , But you still have to go to work . It's just a matter of form
At the bottom of the request , You find it's just User-agent Changed , The others are the same
- When you use a computer to access Url When , You'll find that Request Headers Of User-agent yes
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Because I use Mac Computer Chrome Access to the
- When you switch to mobile access Url When , You'll find that User-agent yes
user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
This means that the browser simulates iPhone visit
Ran goose , The other parameters are still exactly the same , It's just that the server is right Headers Medium User-agent Made a judgment , Or in javascript Function in navigator.userAgent Made a judgment , To know that the accessed device is a mobile device , Or computers 

边栏推荐
- Web technology sharing | whiteboard toolbar encapsulation of Web
- O - ACM contest and blackout (minimum spanning tree, Kruskal)
- Joint examination for management -- sample composition
- It's so brain - burning that no wonder programmers lose their hair
- 深入理解.Net中的线程同步之构造模式(二)内核模式1.内核模式构造物Event事件
- Jupyter notebook basic knowledge learning
- Matlab finds a prime number that is greater than a given integer and follows this integer
- Matlab to find prime pairs within 100
- 国债逆回购在哪个平台上买比较安全?
- Tetris source code (color version)
猜你喜欢

Npumcm selection question 3 and acmc2020a

How to get palindrome number in MATLAB (using fliplr function)

About pickle module - 6 points that beginners must know

Mysql database - create user name & modify permission

Kubernetes: a comprehensive analysis of container choreography

The principle of fluent 2 rendering and how to realize video rendering

Advanced functions of ES6 operation array map (), filter (), reduce()

Review 2021, embrace change and live up to Shaohua

Anyrtc implements application scenarios based on webrtc

Technology sharing | anyrtc service single port design
随机推荐
How many questions can you answer for the interview of Mechanical Engineer?
NPM install --global --save --save dev differences
Distributed -- openresty+lua+redis
G - navigation nightare
1076 forwards on Weibo (30 points)
Single cycle CPU of the design group of West University of Technology
Fundamentals of C language -- similarities and differences between arrays and pointers
1019 general palindromic number (20 points)
FoxPro and I
1058 a+b in Hogwarts (20 points)
Advanced functions of ES6 operation array map (), filter (), reduce()
数数据可视化实战案例(timeline轮播图,streamlit 控件年份 metabase可视化使用教程)2.0
Summary of system stability construction practice
N - Is There A Second Way Left? (minimum spanning tree, Kruskal)
Matlab judges the number of same purchases
Steps for commissioning of vertical machining center
The sound network has fully opened the real-time transmission network sd-rtn, which has been free of network wide accidents for seven years - this is FPA!
Bye civil engineering, hello CS, can you change the certificate to the Blue Bridge Cup
1030 travel plan (30 points)
各省GDP可视化案列,附带csv Metabase处理