Bug #2079
closedIn progressive mode, an initial setInternalPath adds a wtd which causes side-effects
0%
Description
As a follow-up to #2078, when an application calls setInternalPath() in progressive mode before enableAjax() has occurred, Wt will have the browser update the URL with a redirect to the requested URL --- adding a wtd so that it will get handled by the same session. Once added, this wtd remains for the life of the session. If the application has "reload-is-new-session" set to false, this is unexpected (from a user standpoint). Moreover, and I'm not sure if this should be considered a bug, a browser refresh in this state does not work correctly --- it appears unstyled.
In any case, removing the wtd from the URL after a redirect (when reload-is-new-session is set true) avoids the refresh problem, and seems to better mirror the bootstrap mode of operation.
I've attached a patch that removes a wtd parameter from the URL after a redirect. It seems to work in my limited testing, but would certainly benefit from additional review.
The patch is actually supplied in two parts. The first contains a patch to remove the wtd. The second addresses an edge case in createUrl where the params are initially empty (and it outputs an "&"). I'm not sure if this edge case occurs in normal operation, but it occurs with the wtd-removal patch, so I've added a second patch to address it. Without this second patch, a URL without parameters will incorrectly end-up with a suffix of "?&".
Files
Updated by Bruce Toll over 11 years ago
I should have noted that the above report (and patches) are for git version 3.3.0-32-ga20ef3f.
Updated by Koen Deforche over 11 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
- Target version set to 3.3.1
Updated by Koen Deforche over 11 years ago
- Status changed from InProgress to Resolved
Hey Bruce,
I fixed this as follows: when a progressive bootstrap session experiences a setInternalPath() in its first response, it will redirect to the bookmark URL rather than redirecting to the url with sessionID. This fixes the user experience, IMO. I would appreciate if you could confirm that this does indeed do what you would expect when this makes its way to git.
Regards,
koen
Updated by Bruce Toll over 11 years ago
Hi Koen,
Thanks for following-up on this. I look forward to trying out the update/fix when it is available in git.
Regards,
Bruce
Updated by Koen Deforche over 11 years ago
- Status changed from Resolved to Closed