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

边栏推荐
- Determine the number of digits of an integer in MATLAB (one line of code)
- Don't fight for big companies
- Technology sharing | anyrtc service single port design
- (Niuke) BFS
- 1031 Hello world for u (20 points)
- Complement (Niuke)
- Basic literacy - four common software architectures
- Advanced functions of ES6 operation array map (), filter (), reduce()
- Database connection to company database denied
- 1082 read number in Chinese (25 points)
猜你喜欢

How does sd-rtn ensure the high availability of RTE services after infrastructure failure

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

Single cycle CPU of the design group of West University of Technology

Preliminary study on AI noise reduction evaluation system of sound network

Basic literacy - four common software architectures

Review 2021, embrace change and live up to Shaohua

Complement (Niuke)

Npumcm selection question 3 and acmc2020a

RTC monthly tabloid programming challenge ended successfully in June; Review of the first anniversary of sound network's listing

Rte2021 review HDR technology product practice and exploration
随机推荐
Basic requirements for tool use in NC machining of vertical machining center
Steps for commissioning of vertical machining center
Talk about why I started technical writing
E - highways (minimum spanning tree)
Review 2021, embrace change and live up to Shaohua
Repair of incorrect deletion of win10 boot entry
各省GDP可视化案列,附带csv Metabase处理
Advanced functions of ES6 operation array map (), filter (), reduce()
Some reference routines for cache update
Matlab two-dimensional array example (extract data)
Noj1042 - electronic mouse running through maze
1137: encrypted medical record
1133: output family and friends string
深入理解.Net中的线程同步之构造模式(二)内核模式1.内核模式构造物Event事件
G - navigation nightare
1025 pat ranking (25 points)
Notes on zero basic C language learning -- first introduction -- 1 notes that mom can understand
The difference between queue and stack
1066 root of AVL tree (25 points)
Voice codec based on machine learning Agora silver: support high quality voice interaction at ultra-low bit rate