Skip to content

Should router.referrer store the previous page? #883

Open
@chrisvfritz

Description

@chrisvfritz

There are times when it's useful to peek at what the previous page was. With normal page navigation, document.referrer stores the previous URL, but the HTML5 History API doesn't update that value unfortunately. 😞 Would it be desirable to access the referrer on router.referrer? The getter might look something like this:

return document.referrer || this.$router.internalHistory[0]

As you can see, this would also require keeping a stack of previous pages, maybe just 1 level deep by default. Later, perhaps an option could be added to specify the max stack height.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions