Some improvements and doubts about this blog

Source: Internet
Author: User

Hi everyone ~

I have been visiting cnblogs for a few days. I have put forward a lot of comments on the dual blog thanks to everyone's incorrect love. I should have replied to your questions earlier, but if you think about it, you should optimize it to share this blog with everyone in the best status. So I wrote this article several days later.ArticleAnd take this opportunity to summarize the optimization projects of this blog, which will not be optimized and the future improvement direction.

Then let me answer the questions raised by everyone over the past few days:

-Loading your blog is slow.

This problem was reported by some people and was particularly concentrated on the day of June 4/22. I checked it carefully and found that files.cnblogs.com had a long response time that day. It would take nearly 30 seconds to load a Javascript file of several k sizes. These script files cause webpage loading blocking. To solve this problem, I have changed all the script files to inline calls. At the same time, considering that other people may upload files to the system and reference the files in their blogs, similar loading blocking may also occur, so I immediately reported it to the Dudu webmaster and got the Dudu webmaster's first reply, and increased the bandwidth for files.cnblogs.com. Now the problem should be solved. Here, I would like to thank the Dudu webmaster and other cnblogs staff. Only with their hard work can they have this outstandingProgramMember Exchange Platform.

As for the current access speed, the actual data of Shanghai Telecom's 512k broadband access to the blog homepage is as follows:
  • Cache disabled, the status of the first access, 10 tests, the average access time is10.6 s. Average cost534 MsLoad all HTML, CSS, and JS files on the homepage. The rest are image files, including the image files referenced in CSS and the images inserted in articles.
  • Cache enabled: 10 tests. The average access time is2.12 s.97%Data is cached.

Therefore, this access time should be acceptable to most users. In the future, as the number of articles on the home page increases, the loading time may increase. When publishing an article in the future, I will try my best to publish it in summary mode to solve this problem.

-Does not support IE6? -Does IE6 look messy?

Here, we must first clarify what is "support ".

For example, the user's experience in accessing a website can be viewed as a plane flight. An airplane is equivalent to a whole website. There are first class and economy class on the plane. Both the first-class and economy-class passengers can take this flight, but obviously, the first-class and economy-class passengers are in different environments.

the first class represents the website's support for updated browsers, such as Internet Explorer 7, Firefox 2, opera 9, and Safari 3; economy class is the website's support for ie6. FF 0.x, opera 7, Safari 2, and even earlier browsers. The differences in browser performance and features directly determine the services that the first class and economy class can Provide-the maximum length of seats, is it possible to store some of the latest entertainment devices and provide Wi-Fi hotspots. Then airlines-website developers-decide whether to enable these services and to what extent they are enabled. If economy class does not have the hardware conditions for providing certain services, developers cannot do anything about it. For example, rgba PNG--IE6 this economy class originally does not support this very general picture file, passengers holding IE6 flights, naturally there are only two options: or change your economy class to first class, upgrade to IE7, or simply switch to the latest version of FF, opera, Safari and other browsers to enjoy first-class treatment; or continue to use IE6 and only enjoy basic website browsing services. The choice is entirely in the hands of a passenger. This is one of the reasons why many people oppose CSS hack. If economy class does not support multimedia screening centers, the crew can pull a data cable from the first class to create a multimedia projection point in economy class. This is the so-called hack. However, if one day, the civil aviation administration requires that the first class and economy class do not draw lines between each other, the crew still have to pull the line away. Developers are also facing the same problem-I don't know which day, with the emergence of a new browser, the previously used hack will expire, and then you have to correct all the previous problems, this is not worth the candle.

economy class passengers on any flight cannot take seats in first class because economy class passengers do not want to spend too much to enjoy higher quality, but they may not have any practical service. Some passengers may complain, why not make economy class as luxurious as first class? This is obviously not practical-If so, there will be no difference between first class and economy class flights in the world. There is a balance between the cost and income of first class and economy class. This is equivalent to the development cost of a website. Under the constraints of development costs, developers only need to make the first class and economy class as comfortable as possible. However, according to the features mentioned above, the services available for the first class and economy class are also different. It is inevitable that some services can only be provided for the first class. This is not a bad thing. It is precisely these services that promote some passengers who originally intend to buy economy class tickets to switch to the first class tickets. This is exactly what we want to see- more and more new technologies can be applied in practice, rather than being stuck in some old Environments . Here, we will mention a mistake that many developers can easily make. Many developers also believe that economy and first-class classes should be consistent, so they will reduce the specification of first-class classes, and the original multimedia center will not be used, and their seats will be reduced to the economy class level, they also think that they have done a fair and reasonable thing. But in fact, although it seems to take care of economy class users, they are also given additional services to increase economy class users; in addition, they also deprive first class users of the extra services they should enjoy. Therefore, in terms of technology and truth, this is exactly a kind of backward development of web development.

economy class and first class should also be consistent. This idea is not a problem. In fact, this is a practice that should be worth advocating. The key lies in how to " stay consistent ". A passenger purchases a plane ticket to travel from one place to another. Carrying a passenger flight is the most fundamental service that a flight shall provide. Large and comfortable seats, as well as the most advanced entertainment equipment, are only Ancillary Measures to Improve the passenger's travel environment. If a flight has a wrong course and has a wrong airport, I am afraid there will be a good flight environment and passengers will not buy your account. Therefore, for a single flight, the service should be consistent, that is, "smoothly transporting passengers to the destination ". For a website, its basic function is to provide an information service. What users ultimately care about is, naturally, whether the information provided by the website is useful. You can use fancy forms to attract users, but the necessary factors for a website are not forms, but content. How to make users of any browser smoothly access website content is what developers need to work hard. W3C and many other organizations around the world have developed relevant web availability guidelines for specific implementation. Here I solemnly declare: although my blog skin does not fully support old browsers such as IE6, however, I will ensure that my blog is available in any browser . If there is a phenomenon similar to "cannot see text in the input box under IE6", please use it as a bug and be sure to contact me. I will fix these problems in time. As long as you have a browser, I will respect your rights and allow you to access this blog smoothly. In fact, I will try my best to make full use of the features of all browsers. Currently, if you use IE6 for access, the only special service you cannot enjoy is all the PNG background images, and only the color block background can be seen. In addition, considering the performance of IE6, some special effects will also be disabled. Other functions, such as layout and style, are similar to those of other browsers. In the shared version that is finally submitted to cnblog, some discount solutions will be added. However, as I mentioned earlier, for the development of technology, I will not use a compromise or a clever way to accommodate IE6's functional insufficiency, please forgive IE6 users

Some may also say that the economy class of your flight is not as comfortable as the economy class of the next flight, so you will not take this flight. This is completely OK. The positioning of passengers on each flight must be different. The same is true for websites. For commercial purposes, a commercial website naturally does not want Internet Explorer 6 users to be confused. Therefore, it will take how to optimize the performance and performance of the old browser as a very important topic, and be included in the development cost. However, since this blog is a technical blog, it will naturally not make too many practical optimizations for old browsers such as IE6. But as I mentioned above, I will ensure the availability of the blog. Although I do not approve of your use of IE6, I swear to protect your right to use IE6 to access the Internet. Even if you use lynx, I will ensure that you can read the content of this blog smoothly. Of course, people will inevitably have omissions. If there is a bug in availability, be sure to point it out.

In addition, users using IE8 or ff3 are driving the Mars Landing cabin. Before driving, you must have realized that driving these experimental landing cabins is risky. Because we do not have any experience in traveling to Mars, we can only do our best to theoretically ensure your life safety and smooth journey. If it is just to say that, in the event of an accident, you can only rely on astronauts to do your best.

As for those users who use independent installation versions such as IE6, Maxthon, and xunxun, you are riding on a self-modified light motorcycle to help them on the road. Although the two cars seem to be no different from the general Internet Explorer 6, they have actually undergone some unknown modifications, these modifications may affect the travel safety and cycling experience of cyclists. For example, a brake designed to assist a motor train may not work because the brake logic is changed without authorization by the modified loading. Therefore, for your security consideration, it is better to use a regular version of browser + plug-in.

-50% CPU usage on webpages

Interestingly, only a few people mentioned this issue. The problem most people reflect is actually "slow"-that is, the access time mentioned above, rather than "card ". We can literally see the differences. Here, I want to explain that any web page will occupy the CPU when presented. If a webpage does not occupy the CPU when presented ...... Er, what should we do with CPU?

Let's not talk about this first. Let's still look at the actual data: (the data is the average value of 10 tests when IE7 cache is disabled)

  • For the first page of my blog, the peak CPU usage of icycler.exe is33%
  • On the blog homepage, the peak CPU usage is also33%
  • Www.sina.com.cn homepage, with the peak CPU usage58%
  • Yahoo.com, which has always been a top-notch performance optimization service. The peak CPU usage on the home page is44%
  • The blog Park randomly finds a blog with very clean skins without any images. The CPU is27%
  • Google.cn,23%

These data are all tested on the same computer and in the same browser. Other unrelated software and services are disabled as much as possible during the test to ensure that the CPU usage is only generated by the browser as much as possible. Therefore, based on the theoretical analysis of the data, the degree of my "card" on the blog homepage should be similar to that on the blog homepage, far from the Sina or Yahoo card. However, the actual usage experience is that none of the above Web pages can clearly make me feel stuck. Why? It is very simple. People feel far beyond the CPU time. For 1 ms and 500 ms, there may be thousands of Operations different from each other for the CPU, but for people, it is just a general "instant.The CPU peak is meaningless for users to use a common web page, and more importantly, how long the CPU peak lasts. The reason why users think that these Web pages are not stuck is that their peak CPU usage does not exceed 1 second. In fact, if you scroll through any of the above pages with the mouse wheel, around 20% of the CPU usage will be generated. When the cnblogs Rich Text Editor is loaded, the CPU usage is more than 50%, and lasts for about 5 seconds. Even so, users accept it.

Some people may think like this: "You cannot guarantee that all user computers are as good as yours. For low-end users, 33% of the usage may be 100% ."

To explain this point of view, please first look:

This is where I access my blog using safari of iPod Touch. During the access process, I did not feel stuck. The iPod Touch processor clock speed is only 620 MHz. Generally, to reduce power consumption, it works at a MHz frequency. The memory is only 128 MB. I believe that the performance of a computer that is still in use, especially a developer's computer, should not be worse than that of a mobile device?

Unfortunately, even on such mobile devices, the "card" issue cannot be reproduced. However, since someone has raised such a problem, try to give some tentative solutions:

  1. If you are still using an earlier browser version such as IE6, upgrade it to the latest version. If you are using a shell browser such as Maxthon, uninstall it and try to use formal browsers such as IE7 and ff2.
  2. If the above method does not work, install the latest anti-virus software, upgrade it to the latest virus database, and thoroughly scan for possible viruses or malware on your computer.
  3. If you do not have any viruses or malware, run scandisc to check whether your hard disk has bad sectors. If yes, replace the damaged hard disk.
  4. If the hard disk is not damaged, we recommend that you reinstall your operating system. 99% of similar problems can be solved after the system is reinstalled.

I hope these suggestions will help you. If you still think it is very difficult, you can also tell me the specific computer configuration, browser version and network environment. Let me see why.

-Poor black color-black white text looks dazzling

Sorry again. Aesthetics has always been difficult to adjust. Everyone has a different understanding of "good-looking". If your aesthetic is not the same as mine, you will have to be wronged.

Some people say that "black and white words hurt your eyes", but this is a different saying. Some people think that black and white characters are dazzling. In fact, many e-book software and text editing software, including Microsoft Word, provide the black-bottom and white-text display function, just to protect the eyes. However, whether it's black or white, they all improve text readability by improving the contrast. Many people think that "lowering the contrast between background and text can protect your eyes" is precisely wrong. For exampleThis text-- What do you think is better than black and white text, white and black words all hurt your eyes.

But what if I'm not happy with your skin style? Do you have a way to make me satisfied?

Of course. Based on the concept that "you can disagree with me, but you cannot deprive me of the right to speak", W3C clearly pointed out as early as in the css1 specification: "browsers, Document Makers (website developers), and Users have the right to customize the Document Style (that is, a webpage ", in addition, the style rules specified by the browser will be replaced by the style rules specified by the document maker. The style of the document maker will be replaced by the style rules formulated by the user ". Yes, if you are not satisfied with my blog, you can customize the style of this page by yourself. In IE7 and Firefox, you can choose not to load a webpage style. Furthermore, opera allows you to load your own style sheets and completely reload the styles on this page. You can customize the page to a white or black text, remove all background images, or even copy it into a windows blue screen. Everything is under your control. Firefox and IE7 also have some plug-ins that provide such functions. You can use this to exercise your rights. Of course, if you are still using IE6, I can only express regret,IE6 does not properly protect your rights. In terms of custom styles, there are many other aspects. IE6 is not unfriendly to developers-it does have such a bug, but almost all bugs, developers have many mature methods to fix or circumvent. What is really bad about IE6 is that it is unfriendly to users. It prohibits users from enjoying legitimate rights, so that users do not know what they can do, how much initiative they have on a web page, and ultimately have to rely entirely on developers. However, it is a pity that developers always have to take care of a large group of users. It is difficult, or even impossible, to achieve the goal of meeting most users, as a result, some users will always be dissatisfied with a webpage. Those users who are not satisfied can have a richer user experience by exercising their rights. Unfortunately, IE6 does not allow them to enjoy such equal treatment. Therefore, if you are still using IE6, please upgrade it as soon as possible.

 

Above. This blog will continue to be stable for a period of time. After listening to the user's opinions, we will add style support for IE6 and submit it to the blog community for sharing. That's why I used it.CommunityMake a small contribution.

So, goodbye next time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.