Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how SPF handles anchor links #378

Open
nicksay opened this issue Jan 6, 2016 · 1 comment
Open

Document how SPF handles anchor links #378

nicksay opened this issue Jan 6, 2016 · 1 comment

Comments

@nicksay
Copy link
Contributor

nicksay commented Jan 6, 2016

The SPF documentation needs to describe how anchor links (aka hashes aka fragments, eg /path#frag) are handled.

For example, from https://groups.google.com/d/msg/spfjs/zhdS3GQJEiY/IkR6w9ZSBAAJ

Also, when navigating between two URLs that only differ by the hash, SPF won't make a request, just scroll the page (if possible).

Here's an example of what happens when clicking or going back across some links:

[load]     /foo
[click]    /foo  -->  /bar             (request /bar)
[click]    /bar  -->  /bar#target      (scroll to #target)
[click]    /bar#target  -->  /other    (request /other)
[back]     /other  -->  /bar#target    (request /bar, then scroll to #target)
[back]     /bar#target  --> /bar       (scroll to top)
[back]     /bar  -->  /foo             (request /foo)
@wimleers
Copy link

wimleers commented Oct 3, 2016

+1 — this is obvious to those who have implemented something like SPF (for example: Turbolinks or https://www.drupal.org/project/refreshless), but not to everyone. It's valuable to have this documented, to prevent confusion, help future maintainers and avoid having to repeat the same answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants