Understanding document.referrer behavior

204 views Asked by At

I am working on an application where the first 10 pages are ajaxed & for the 11th page to load the page first refreshes & loads the 11th page. But when the page refreshes the document.referrer also seems to have the incorrect value. So when I'm on the 11th page , document.referrer would show me the 11th page url instead of the 10th page url.

Why would this happen? I'm not overriding any document.referrer behavior or anything like that.
Shouldn't the document.referrer show me the 10th page url when I'm on 11th page?

I know localStorage etc could be one way to get correct information but I'm curious why would document.referrer behave that way?

0

There are 0 answers