Skip to content

URL preserving option #405

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

Closed
wants to merge 1 commit into from
Closed

Conversation

3bl3gamer
Copy link

Allows to preserve URL until response is received.
For example, on some http://site.com/blog is a link http://site.com/refresh which jush redirects back to http://site.com/blog.
If user clicks on refresh with pjax URL will change to http://site.com/refresh for a bit and then (on response) back to http://site.com/blog.
With this option URL will remain same during all refreshing.

@m1kc
Copy link

m1kc commented Dec 22, 2014

+1 to this PR. Gonna merge it?

@mislav
Copy link
Collaborator

mislav commented Dec 22, 2014

I'm not super-excited about adding more configuration options, especially because it's for something for a use-case that I don't understand. What's wrong with a URL briefly changing? Native browser behavior would be the same way.

@m1kc
Copy link

m1kc commented Dec 22, 2014

First of all, browser's behavior is not the same: for example, when my Firefox meets a redirect, it displays only final URL in the address bar. That's a good thing: there's no point in showing intermediate URLs, because usually they're not for human eye anyway (like /logout?csrf_token=skdfuc8721812cc87x3). So, I want PJAX to copy browser's behavior. To be honest, I'd prefer this to be default behavior rather than an option, but an option is fine too.

@m1kc
Copy link

m1kc commented Dec 22, 2014

I don't understand this particular example from @3bl3gamer too, but redirect masking seems like a good idea to me. Of course it is better to get rid of redirect itself, but sometimes that's impossible.

@mislav
Copy link
Collaborator

mislav commented Dec 23, 2014

I stand corrected: it seems that Chrome and Firefox don't show the URL until the final redirect. (Safari doesn't show URLs anymore.)

Closing as duplicate of #334. Although these issues don't seem to be related at first, we were discussing the shortcomings of when we update URLs/do pushState there and how we can improve the current situation. Ideally we'll figure things out and solve this without the need for extra configuration options.

@mislav mislav closed this Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants