Why cannot I view the source file in IE and how to solve it?
Source: Internet
Author: User
From: http://hi.baidu.com/chenzixine/blog/item/32a72c2e6ecb34544ec2260a.html as a WEB programmer, may need to often view the page source code, but what if suddenly ineffective? The following are excerpted from Zhongguancun online:
Category 1When the browser cache is full, the "View Source File" function becomes invalid. If you want to determine whether your computer is in this situation, you can click the "Internet Options" and "general" tab in the "Tools" menu of IE. Then, click "delete file" in the "Temporary Internet Files" column.
Category 2When you open some special browser windows (for example, a webpage written in JavaScript), the "View Source File" function will also become invalid. This is not the case if you cannot "view source files" When browsing any web page.
Category 3When a Web page is not fully loaded to the desktop, the "View Source File" function cannot be used (in this status, the "Save as" option in the "file" menu is also blocked ). This is not really a problem.
Category 4If you cannot find notepad.exe, the "View Source File" function cannot be used.
Category 5If the TEMP (or TMP) environment variable points to a non-existent folder, the "View Source File" function is unavailable. Open the command prompt window and type set temp (or set tmp) to view the values of these variables.
Category 6The registry setting can also limit the validity of the command line. First, click the "Start" menu, type "REGEDIT" in the run dialog box, bring up the Registry Editor, and click "HKEY_CURRENT_USER/Software/Policies/Microsoft/Internet Explorer/Restrictions ", in the right pane, find a value named NoViewSource. If the current value is set to 1, double-click it to change the value to 0.
Category 7By checking the registry settings, you will also find that the "View Source File" function fails if the specified calling program is incorrect. Call up the Registry Editor and click "HKEY_LOCAL_MACHINE/Software/Microsoft/Internet Explorer/View Source Editor/Editor Name". If this key exists, the default "Value Name" displayed in the right pane should be the complete path of the Notepad program, which is generally expressed as "C: windowsnotepad.exe. If the key does not exist, first check the correct location of the Notepad program, and then double-click the default key value to modify the Error Path.
Category 8The group policy setting may also block the menu item "View Source File. From the "Start" menu, bring up the "run" dialog box and type GPEDIT. MSC. If a prompt box is displayed on the desktop indicating that the file name is incorrect, the failure of the "View Source File" function is irrelevant to the Group Policy settings. Otherwise, the "Group Policy Editor" window will pop up on the desktop. Click "User Configuration/Administr-ative Templates/Windows Components/Internet Explorer/Browser" and find the View menu in the right pane: disable Source menu. If this key value is set to "Enabled", change it to "Disabled ".
Note: the first type of situation described above (that is, the function of viewing source files fails due to the large number of Temporary Internet Files saved by IE) is the most common. If you find that you can only save the webpage images in BMP format, most of the reasons are the same.If this feature is still unavailable after all offline content is deleted, check the following possibilities until the problem is eliminated. Appendix: Tips for viewing source files: 1. view the source code of a webpage with a Frame. If some webpages use a Frame ), if multiple windows are used, you can only obtain the source code set by the framework by using the commands on the IE menu. Therefore, you cannot view the webpage design details. At this time, you need to change the method. Move the mouse pointer to a non-link location on the webpage, right-click, and select "View Source File" in the pop-up window. To view the source file of a window, point the mouse pointer to the window and right-click the window. 2. The simplest way to use special commands is probably to use the commands. The format is view-source: http: // localhost: 8021/. At this time, the webpage does not display, but a text box displaying the webpage source code appears. For a webpage with a framework, You can first find the name of a webpage of interest in the framework, and then use this command to view the webpage source code in the framework. 3. The method above the Web editor is useful, but some web pages do well in secrecy. First, it uses multi-window Frame pages, so that the source code viewing function on the IE menu can not play a role, and then it shields the right mouse, what should I do? At this time, we can consider using the Web Editor to view the web page source code. Take IE as an example. The procedure is as follows: Click the Frame window of the source file to be viewed and drag the mouse to select the part to be viewed. If the mouse is completely shielded, you can also select "edit"> "select all" on the IE menu ". Click Edit> copy ". Next, open the FrontPage editing tool, click "file"> "new", and select "edit"> "Paste ". At this time, the webpage to be viewed or part of the content is copied, and the source code can be viewed using what you see in FrontPage. Although this method is cumbersome, it is quite effective. First, this method is not restricted and applies to all webpages. In addition, you can use this method to view specific content. Sometimes the source file of a Web page may be large, and the specified source code is like a haystack. With this method, you can easily find the required source code. If you are in trouble, we can also use another method. First, save the webpage with a Frame window in the form of "webpage, all, you can find several HTML files of the sub-windows in the Frame window in the saved webpage directory. Then, you can use the front page and other webpage editing tools to open the file and view the webpage source code.
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.