Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari 7 Network Request Timeline doesn't show redirects?

Tags:

http

safari

I'm trying to debug an issue with redirects between websites that I'm pretty sure is due to Safari's default handling of 3rd party cookies, but I'm trying to confirm where the issue is by looking at the cookies being passed in requests/responses using the Network Requests timeline in the Web Inspector. This is all HTTPS traffic, so an external sniffer is out - I need to use Safari's debugging tools.

The problem I'm having is that I think the network timeline is not reporting redirects. I have a page I've written that contains nothing but a javascript redirect to a vendor website; it should validate URL params and pass back a page the performs another redirect. What I see in the browser is a different page (login page, vendor website). The network timeline shows my page being loaded, followed by the vendor login page being loaded. The inspector shows my pages as the referrer to the login page. There's no reference to this login page in my code - this has to be the result of a redirect from the correct page (the one my javascript code is supposed to redirect to). But the timeline doesn't show any redirect.

I know it is supposed to show redirects; I found a post on the safari blog when the feature was added to Safari 6. I can't find a setting or anything to control this.

Is this a known bug? Was the feature removed in Safari 7? Or is this operator error?

Update: I tested in Firefox, using the "From Visited" option for "Accept third-party Cookies" setting, to mimic what Safari does by default. In Firefox's timeline, I can clearly see two 302 redirects before landing on the vendor login page. Safari does not show them. So it definitely appears that safari is supressing them. Is this a bug or a setting I've missed?

like image 844
Jason Clark Avatar asked Jun 18 '14 18:06

Jason Clark


People also ask

How do I see Safari network requests?

Open up Network tab Navigate to Network tab and you can see the files requested over network. Select one of the requested items and go to its Headers item. You can see the following image showing Summary, Request and Response sections.

How do I stop redirects on Safari Mac?

To block the pop-ups and redirects on Safari macOS, firstly launch the Safari browser and select the Safari option from the menu bar and then click on the Preferences. Now, switch the tab to Websites and select Pop-Up Window from the menu on the left hand. At the bottom, switch the drop-down to Block the Pop-Ups.


1 Answers

In Safari the HTTP redirects are shown in the resources tab, not in the timeline. Every redirect is displayed as separate resource entry providing all its meta-information such as timing and headers. Take a look at the screenshot enter image description here

Selecting a redirect chain entry gives you its status code and the redirect location in the response headers. enter image description here

Source and more information: https://www.webkit.org/blog/1091/more-web-inspector-updates/#resources_inspection

like image 55
Francisco Félix Avatar answered Sep 24 '22 02:09

Francisco Félix