I guess so, but I think it's a pretty safe assumption:

1. Assumes that `location.pathname` will end with a `/`. Django assures this is true.
2. Assumes that the last part of the path ('new-b' in this case, 'new' in future) is what we want as the referrer.
3. It's `-2` because of assumption 1 and thus the last element in the array will be an empty string.