26

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?

BenHohner
  • 356
  • 1
  • 4
  • 14
  • Possible duplicate of [Safari Developer Tools: How to Preserve Log Upon Navigation?](https://stackoverflow.com/questions/14572693/safari-developer-tools-how-to-preserve-log-upon-navigation) – Daniel Compton Oct 01 '17 at 00:40

4 Answers4

40

In Safari 16.0 they have moved again:

Safari network log settings


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

Console tab

Network tab

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".

Safari settings for network and console clearing when page navigates

Daniel Compton
  • 13,878
  • 4
  • 40
  • 60
  • 2
    You answered this a year ago already, and I'm using Safari 11.1.2, but I do not see these options. What version are you using and do you _still_ see these options there? –  Jul 22 '18 at 14:24
  • 2
    It looks like they moved it again! I've updated my post to show 11.1.2 placements as well. – Daniel Compton Jul 22 '18 at 22:56
  • Yup, the window being too small to show the options was my issue _facepalm_ – Eli Nathan Oct 02 '20 at 11:41
  • I tried this setting on google.com to see the redirect path of an an ad. But the log is not preserved even though the setting is applied. Any idea? – Benedikt Apr 12 '21 at 10:10
  • It's been a while. But it seems to have moved again or maybe depending on resolution. For me it was under some weird circle-with-3-dashes icon. – Jenne Oct 27 '22 at 09:47
19

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!)

ShortFuse
  • 5,970
  • 3
  • 36
  • 36
8

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.

Brian Burg
  • 795
  • 4
  • 10
  • 1
    Any idea whether this setting is available somewhere in Safari 9.1.3? -- EDIT: Oops, I misread that your answer was from 2013. :) – tuomassalo Mar 24 '17 at 08:47
  • @tuomassalo its a 2017 answer. 8th Feb 2017, 8:13pm :) And by the current version of safari 10.1.1, i can see network logs are preserved. – Dhairya Vora Jul 25 '17 at 07:36
  • @DhairyaVora How to do you enable it? I'm on Safari 10.1.1 and my network logs are cleared upon navigating to a new page. – Andrew Allbright Aug 24 '17 at 13:36
  • 4
    @AndrewAllbright It's not in 10.1.2 as far as I can see, but it is in the "Technology Preview" version available here: https://developer.apple.com/safari/download/ – alnorth29 Aug 30 '17 at 19:08
0

It is the logo with a circle and 3 horizontal lines that preserves network tab -> preserve logs button, at least in Version 16.0