RedirectChain Question

15 views
Skip to first unread message

Debin Zhang

unread,
Oct 7, 2015, 3:49:46 PM10/7/15
to Chromium-dev
When I go to www.espn.com, I am redirected to espn.go.com. It is a 302 redirect. But when I check RedirectChain, I do not see www.espn.com in redirectChain. After digging into the code, I found the redirectChain had been cleared by the clearRedirectChain() function, which is called by DocumentLoader::updateForSameDocumentNavigation(). However, the same does not happen when I visit box.com, which is redirected to www.box.com. This is a 302 redirect. Looks like in the box.com case, DocumentLoader::updateForSameDocumentNavigation() is not called at all. So two questions: 
1. Is RedirectChain reset for 302 redirects only?
2. When will DocumentLoader::updateForSameDocumentNavigation() be called?

Thanks

Debin

Nate Chapin

unread,
Oct 7, 2015, 4:10:12 PM10/7/15
to debin...@gmail.com, Chromium-dev
A same document navigation is either a fragment navigation, or a history state modification (i.e., history.pushState() or history.replaceState() in js). DocumentLoader::updateForSameDocumentNavigation() is only ever called in those cases.

I would guess espn.go.com is doing one of those after the redirect.
~Nate

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Reply all
Reply to author
Forward
0 new messages