MacOS usage tips 19: Safari bunker function 2 view webpage source code, ossafari
In my junior year, I chose search technology and learned some information about search engines and web crawlers on the Internet. Later, we made a bit of water, this means that only the scores and downloads of dozens of software from several large download websites are obtained. when you enter a program name, we will sort the recommendations based on the downloads and scores. Cough. At that time, we needed Firefox in windows to view the source code of the Web page. This powerful Safari can also do, and even Safari provided a stronger function to view the source code, but it was hidden.
Next I will introduce the hidden feature of Safari: view the web page source code.
Go to Safari, choose menu> preference settings, or click "command" + comma to enter. On this page, open the Advanced tab and select the "show" development "menu in the menu bar at the bottom"
Next, go to the extra development menu and click here to display the page source file. Then we can see the source code of the webpage.
After selecting the displayed source file, we can see the messy source code.
Do you think Safari is exceptionally powerful. Make good use of it.
2014.10.1 0: 45 By Mr. Losers
How does safari view source code?
The IOS system mainly uses Apple's Safari browser to surf the Internet and view webpages.
However, unlike IE, Safari does not support viewing source code.
Here we recommend a method to view the html source code:
1. Save a bookmark for the webpage that needs to view the source code;
2. Edit the bookmarks and change the URL to the following code:
Javascript :( function () {var a = window. open ('about: blank'mirror.doc ument;. write ('');. close (); var specify umentElement. innerHTML)}) (); 3. close the edit bookmarks. Click the bookmarks from the bookmarks menu in Safari. The source code is displayed.
[Tips] How to "view source code" in iOS Safari"
The following is how to set up: save this page (or any page) as a bookmarkdonator in Safari on iPad, iPhone, or iPod touch, and name it "View Source Code". Click here to view the JavaScript code of the bookmarks, select all-copy and click the bookmarks icon in Safari, and click "edit ", click the bookmarks saved in step 1 and paste the JavaScript code copied in step 2 to the URL address bar. Click "finish" to save the changes. Now, when you want to view the source code of a webpage, open the bookmarks menu and click "view source code" to view the source code after syntax highlighting and link clickable processing. It should be noted that the JavaScript here will send the current page to Michelin. if you are not at ease with this, you can consider other viewing methods. dk syntax highlighting is really great.