I put here for avoiding to make this checking everytime we call updateHeaderData. On the other hand I would like to isolate `updateHeaderData` to window.location in this case.