In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about how to deal with the impact of web hollow paths on page performance. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
I saw the sharing of Yubo blog on Google Reader a few days ago-the impact of empty paths on page performance. Indeed, when writing CSS, using background:url (#) will make one more request to the page.
However, because writing multiple CSS, generally need to use an empty background to solve the bug, the test results with background:url (about:blank) is what we want: solve the bug, does not affect performance. That's very simple. Won't the solution come out? Wait, let's do a test.
Test the code:
The code is as follows:
Empty src
Body {font-family:courier, 'courier new';} code {background:#f7f7f7;border:1px solid # ddd;padding:0 3px Toun Muzmakit cite cite 2pxTen 2pxFont Mustang 2pxFont Mustang 12pxColorusWan080;} p {color}
1. Send a request:
Browsers: All, some browsers such as chrome, hash (#) and null only request this path
The background image uses background:url (#) to send the request
(2) partially send the request:
Browsers (very small latency): safari, chrome (multiple about:blank will send multiple requests)
Use about:blank
Hello world
Second, do not send a request:
Browser: all, chrome (invalid delay, equivalent to no request sent)
Use _ javascript:''
Don't bother to take screenshots, do it by yourself. The browsing results have been roughly written on the test page. The ultimate solution is:
Boldly use about:blank instead of null, or'#', especially in background-image
It is recommended to use _ javascript: "to solve the problem in img / script / iframe
Thank you for reading! This is the end of the article on "how to deal with the impact of web hollow path on page performance". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.