Strategy
A site to make good, in detail there must be some place to adjust, such as invalid links, Java, cookie errors, etc., so the site debugging is a link that can not be ignored. You can do this by using your browser.
Although Internet Explorer (IE) in the browser market occupies a dominant share, but not to say it is strong to the point of no fault, in addition to security problems, in Webmaster site debugging, also exposed the serious lack of ie. In fact, many webmasters use the old Mozilla Web browser to debug their own web site, it can quickly, efficiently and instantly find the problems in the Web page.
Why Mozilla is more suitable for debugging Web sites than IE
And IE is different, Mozilla not only can be used for web browsing, web editing, and more importantly, Mozilla built a powerful debugging tools, can easily and efficiently to the site of the Web page JavaScript error correction, cookie Management, source code view, DOM view and page information query, etc. , these are not easy to do ie.
Application environment: When IE script information is too simple
Using JavaScript in Web authoring is commonplace, and when JavaScript problems occur, a simple error-prompt dialog box pops up in IE, telling you that there are errors in the page (Figure 1), that the error message is too simple, and that it cannot be managed, Can not meet the need to debug web work. In this case, we can use Mozilla to solve.
Wrong, and so be "uncovered"
Mozilla has a "JavaScript console" built into it, so as long as you open the JavaScript console when you debug a Web page, you can see the JavaScript error messages that are logged, to help you figure out where the error is, and to correct the error in the page.
How do you use Mozilla's built-in JavaScript console to quickly locate the problem? actually very simple. When using Mozilla browser to debug a Web site, click on the "Tools →web Development →javascript Console" item, pop up the JavaScript Console dialog box (Figure 2) and record the JavaScript error message in the list box. And each error message has a detailed record of the file name of the error, the line number of the JavaScript error, and the context in which the error occurred, making it easy to identify the JavaScript error location and the cause of the error. In addition, you can right-click on the error item, select the "Copy" item in the pop-up menu, and copy the JavaScript error message to the Clipboard to save it to another file.
Tip: Although the JavaScript console is powerful, there are drawbacks, which means that all JavaScript error items cannot be saved to a single file and can only be saved manually.
Strict mode, let the page display more "smooth"
In Web page debugging, there is an error message in addition to the JavaScript error message, which is the "strict JavaScript warning" message. Although this "javascript warning" does not have a JavaScript error message, it can also seriously affect the speed at which Web pages are displayed, and this JavaScript warning error must be removed to make your site perfect.
By default, Mozilla does not record "strict JavaScript warning" information and must be activated manually. In the main Mozilla browser window, after clicking edit → preferences, pop the Preferences dialog, switch to the Debug project bar, select the "Show strict JavaScript warning message" option, and then click "OK". The JavaScript console then records these warnings to help users find the JavaScript problem, optimize your Web page, and make it appear smoother.
application Environment: When IE cannot manage cookies
In the cookie file to save the site and users of a lot of confidential information, so in the site debugging work, cookie debugging is also an important link. Because IE provides the cookie management or debugging function is too weak. The only awkward way to manage or debug cookies is to go to the "%userprofile%cookies" folder in a Windows XP system and manually view, edit, or delete the information contained in the cookie file, which is inconvenient. The only thing IE can do is to empty all of the cookie files at once (Figure 3).
Not the same cookie management
Mozilla has full control over cookie files, including settings, deletions, and cancellations of cookie files, and you can easily use the cookie Manager to view all cookies that are currently set, and of course optionally delete cookies. All cookies are easy and easy to manage.
In the main Mozilla browser window, after clicking the "Tools →cookie Manager → manage stored cookies" item, pop up the cookie Manager dialog box. To manage existing cookie files is simple, switch to the "Stored Cookies" tab, where you can view cookie file information or delete cookies.
If you want to view the cookie information for "bbs.cpcw.com", simply select the cookie item for the site in the list box, and then display the content of the cookie information for this site in the "information about selected cookies" column below. This makes it clear to the content of the cookie information on the site; To remove the cookie file, select the cookie item and click the "Delete Cookie" button below, and then click the "Remove All Cookies" button to remove all cookies.
Hint: Mozilla and IE, compared to the Web site cookie management more convenient, but also reduce the site cookie debugging difficulty, effectively enhance your site security.
Application environment: When Notepad is unable to see the source code
How to efficiently view the source code is related to the site debugging efficiency of an important factor. In general, we use the simplest program Notepad in the Windows system. Although Notepad is placed in the Windows system, small size, less resources, easy to invoke, but the function is too simple. In IE, use Notepad to view the source code of the Web page, just a feeling: Chaos! Every time I look at the page code, headaches, Web page debugging efficiency significantly reduced, the Web page contains the source code errors are difficult to find.
The syntax is "highlighted"
To improve the efficiency of source code viewing, Mozilla has built-in code viewer with syntax highlights, so that webmasters can easily see the overall structure of HTML files. In this way, it is easy to find out the error in the source code of the Web page, effectively improve the site debugging work progress (Figure 4).
and Mozilla also supports viewing the selected part of the source code, which is one of the most effective features of the source code viewing process. When there is an error in the Web page, experienced webmaster General can determine what part of these problems, then you can take full advantage of "view the selected part of the source code" function, narrow the source code to check the scope, accurate positioning error location, greatly reduce the effort to pay, improve the site debugging efficiency.
In addition, Mozilla also offers a number of features, such as page information viewing, JavaScript debugger, DOM Viewer and cache Manager, can effectively improve the progress of Web site debugging, improve work efficiency, these can play a role in Web site management.