Safari Developer Tools: Preserve Network Log on Navigation

巧了我就是萌 提交于 2019-11-27 14:54:41

问题


When using Safari Web Inspector to view the Network Log, the log is reset upon navigation, i.e. navigating to a different page clears the log.

In the Chrome Developer Tools, I can easily persist the network log by checking the "Preserve log" checkbox in the Network tab. In Firefox Developer Tools, I can preserve the network log by checking "Enable persistent logs" in the developer tools preferences.

With this persistence enabled, the network log remains intact until I manually clear the output, simplifying the process of tracking requests and redirects that happen during navigation to a new page.

Is there a similar feature in Safari Web Inspector?


回答1:


In Safari 11.1.2 this is a setting on each tab under the checkbox "Preserve Log"

Note that if your Web Inspector window is too narrow to show all options, you'll have to expand it until it is wide enough to display the Preserve Log option, as mentioned in an answer by ShortFuse.


In Safari 11 this was in the Settings panel under "Network: Clear when page navigates", and it's sister setting "Console: Clear when page navigates".




回答2:


There is a Preserve Log option in Network.

The problem is that if your window is too narrow, it disappears and Safari gives you no indication that it's there. Resize your Web Inspector window to be wider.

(That was a fun one to figure out!)




回答3:


This was just added to WebKit last week: https://trac.webkit.org/changeset/211451

You can expect it to make it into a Safari Technology Preview build soon. Once it's in a build, you can toggle preserving logs on navigation in the Settings Tab.



来源:https://stackoverflow.com/questions/41494804/safari-developer-tools-preserve-network-log-on-navigation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!