当前位置:网站首页>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 

边栏推荐
- Teach you a learning method to quickly master knowledge
- Scattered knowledge of C language (unfinished)
- 1066 root of AVL tree (25 points)
- About pickle module - 6 points that beginners must know
- Using member variables and member functions of a class
- Technology sharing | how to quickly realize audio and video online calls
- K - rochambau (joint search, enumeration)
- Technology sharing | anyrtc service single port design
- Industry analysis | the future of real-time audio and video
- 4.7 type() function query data type
猜你喜欢

Tetris source code (color version)

Experiment of the planning group of the West University of technology -- pipeline CPU and data processing Adventure

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

Rte2021 review of the practice and the way of AI OPS landing

Zero basic C language learning notes -- first introduction -- 2 data types & variables and constants

Rte2021 review HDR technology product practice and exploration
![[matlab] 2D drawing summary](/img/de/6bb5385f440a2997dbf9cbb9a756eb.jpg)
[matlab] 2D drawing summary

Voice codec based on machine learning Agora silver: support high quality voice interaction at ultra-low bit rate

Pycharm----xx. So cannot open shared object file problem solving

Some reference routines for cache update
随机推荐
Industry analysis | the future of real-time audio and video
Matlab finds a prime number that is greater than a given integer and follows this integer
Start your global dynamic acceleration journey of Web services in three steps
Shift operator (detailed)
Distributed -- openresty+lua+redis
RTC monthly tabloid programming challenge ended successfully in June; Review of the first anniversary of sound network's listing
国债逆回购在哪个平台上买比较安全?
H - Arctic network (minimum spanning tree)
1136: password translation
Working principle and fault treatment of cutting cylinder in CNC machining center
4.6 floating point number
Operator%
M - smooth engineering continuation (minimum spanning tree)
The difference between queue and stack
Is Domain Driven Design (DDD) reliable?
Repair of incorrect deletion of win10 boot entry
高精度CNC加工中心为什么会出现误差?这4个原因你要注意!
C language \t usage
Average and maximum values of MATLAB matrix
1030 travel plan (30 points)