URL::previous() fallback from session might be undesirable #10229
Closed
Description
Commit 9e484a0 (and the subsequent c956a53) introduced a fallback for URL::previous()
, taken from the session, in case the referer is empty.
Considering this method is usually used in some "navigation flow", I think this might be undesirable under some circumstances.
Take the following scenario: user navigates on the site, then open a new tab without referer (bookmark, direct input, whatever). This new tab will have a "previous url" completely unrelated.
Hence, this issue to ask for your thoughts.
For the record, I personally do this:
public function previousOr($fallback)
{
return $this->to($this->request->header('referer', $fallback));
}
Metadata
Assignees
Labels
No labels