当前位置:网站首页>Cause analysis and solution of too laggy page of [test interview questions]
Cause analysis and solution of too laggy page of [test interview questions]
2022-07-07 22:55:00 【Xiaowu knock code】
Recent market conditions , Many partners have the intention of passive job hopping , Recently, the editor will mainly update some relevant interview questions , I hope that helps .
In fact, many interviewers ask some questions , Mainly I want to examine the candidates' logical thinking ability and expression ability . Novice testers are not experienced enough , It is often easy to miss some key points , Therefore, it is suggested that you should be well prepared before the interview .
The specific operation is actually to brush the surface more , When encountering some common problems , Don't worry about looking for the answer first , But first think about how you would answer .
Just imagine , If the interviewer happens to ask the question you reviewed , Can it help you improve your interview success rate ?
Tip: If you encounter a prepared problem , Don't rush to finish all the answers at once , Show the process of your thinking , On the one hand, don't let the interviewer feel like you recite the topic , I don't have my own understanding ; On the other hand, you can also want to see if there are any missing points .
Don't talk much , The reason analysis and solution of the too laggy page are as follows :
The reason a :http Too many requests
solve : Reduce http Number of requests .
① Picture map : Integrate multiple pictures into one picture , Locate hyperlinks by location .
② CSS Sprites Merge pictures , By designation CSS Of backgroud-image and backgroud-position To display elements .
③ Merge JS Scripts and CSS Style sheets .
④ External use JS and CSS file .
Reason two : Receiving data takes too long , If the download resources are too large
solve : Yes HTTP The transmission is compressed .
That is to say js,css、 Pictures and other resources have been compressed , stay HTTP Re compression during transmission .
The client can use the Accept-Encoding Header to declare the compression method supported by the browser , Server through Content-Encoding To enable compression , Configure compressed file types , Compression way .gzip Using lossless compression , The compression effect is the best , It has become the most widely used 、 The most data compression formats supported by browsers .
Reason three :JavaScript The script is too large , Blocking page loading
solve : take JavaScript Put the script in front of the label .
script No, async and defer when ,JS The file will be executed immediately after downloading . In this case ,script Putting it at the top will block the page rendering , When the network speed is slow, it will lead to “ hang ”, Don't continue rendering the page until the script is downloaded .
therefore ,script Put it at the bottom to make the page appear as soon as possible .
https://blog.csdn.net/zhouziyu2011/article/details/71330739
Reason four :CSS、JavaScript、 Pictures need to be loaded repeatedly
solve : Static resources are placed on a static domain name , Reduce the burden of repeatedly downloading static resources .
Reason five :cookie influence
solve : Reduce cookie Influence .
① Remove unnecessary cookie, If the web page doesn't need to cookie It's totally forbidden .
② take cookie Minimize the size of : Reduce HTTP Size of request message , Improve response time .
③ Set the appropriate expiration time :cookie The information will be stored on the hard disk , Even if the browser exits cookie There will be , as long as cookie Not cleared and still within the expiration time , The cookie It will be sent to the server when accessing the corresponding domain name .
④ By using different domain Reduce cookie Use :cookie When accessing the resources under the corresponding domain name, you will pass HTTP The request is sent to the server , But when accessing some resources , Such as js,css And pictures , Most of the time cookie It's redundant , You can use different domain To store these static resources , In this way, when accessing these resources, no extra cookie, So as to improve the response speed .
Reason six : Too many web resources
solve : Use CDN Deploy the network to improve download speed , You can go through free CDN Suppliers to distribute web resources .
reason :DNS Parsing speed
DNS Resolution is from domain name to IP Parsing .DNS Parsing includes the number of iterations and the time spent on each parsing , The product of the two is DNS The total time spent parsing . Many people ignore DNS Analytic factors , In fact, it is also very important for website parsing speed . You can replace the one with low delay DNS The server .
Finally, thank everyone who reads my article carefully , The following online link is also a very comprehensive one that I spent a few days sorting out , I hope it can also help you in need !

These materials , For those who want to change careers 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful ……
If you don't want to grow up alone , Unable to find the information of the system , The problem is not helped , If you insist on giving up after a few days , You can click the small card below to join our group , We can discuss and exchange , There will be various software testing materials and technical exchanges .
| Click the small card at the end of the document to receive it |
Typing is not easy , If this article is helpful to you , Click a like, collect a hide and pay attention , Give the author an encouragement . It's also convenient for you to find it quickly next time .
Self study recommendation B Stop video :
Zero basis transition software testing : Self taught software testing , Got the byte test post offer, Is the B The best video station !
Advanced automation testing : Huawei has landed , Salary increase 20K,2022 Most suitable for self-study python Automated test tutorial , Spend it yourself 16800 Bought , Free sharing
边栏推荐
- Nx10.0 installation tutorial
- 线上面试,该如何更好的表现自己?这样做,提高50%通过率~
- Basic knowledge of linked list
- Redis官方ORM框架比RedisTemplate更优雅
- Debezium系列之:源码阅读之BinlogReader
- 7-51 combination of two ordered linked list sequences
- LeetCode144. Preorder traversal of binary tree
- Line test - graphic reasoning - 4 - alphabetic class
- C # Development -- pit encountered in JS intermodulation
- 行测-图形推理-7-相异图形类
猜你喜欢

XMIND mind mapping software sharing

Line measurement - graphic reasoning -9- line problem class

微生物健康网,如何恢复微生物群落

Matplotlib快速入门

如何选择合适的自动化测试工具?

「开源摘星计划」Loki实现Harbor日志的高效管理
![LeetCode206. Reverse linked list [double pointer and recursion]](/img/3c/84351e771ac9763c1e5f7b4921c099.jpg)
LeetCode206. Reverse linked list [double pointer and recursion]

Robot autonomous exploration DSVP: code parsing

Line test - graphic reasoning - 4 - alphabetic class

Leetcode1984. Minimum difference in student scores
随机推荐
6-3 find the table length of the linked table
LeetCode203. Remove linked list elements
如何选择合适的自动化测试工具?
Ueeditor custom display insert code
行测-图形推理-1-汉字类
How to close eslint related rules
Matplotlib快速入门
Class implementation of linear stack and linear queue (another binary tree pointer version)
Line test - graphic reasoning - 2 - black and white lattice class
Debezium series: set role statement supporting mysql8
知识点滴 - PCB制造工艺流程
vite Unrestricted file system access to
Typeorm automatically generates entity classes
变量与常量
CTF练习
Get the week start time and week end time of the current date
新版代挂网站PHP源码+去除授权/支持燃鹅代抽
IP network active evaluation system -- x-vision
行测-图形推理-4-字母类
Xcode modifies the default background image of launchscreen and still displays the original image