Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Specific kind of URL results in duplication of first page in DOM #5100

Closed
gabrielschulhof opened this Issue · 2 comments

2 participants

@gabrielschulhof
Collaborator

http://domain/path/to/page1.html?name=value#/path/to/page1.html

This URL will result in the first page defined inside page1.html being loaded via AJAX into the DOM of page1.html. The originial copy of the first page is left unenhanced, whereas the second copy is enhanced and activated.

The faulty code appears to be inside isFirstPageUrl, which is called from loadPage to determine whether the page to be loaded is already loaded. This is the line inside isFirstPageUrl which is susceptible to the presence of a query string:

samePath = u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ),

documentUrl.hrefNoHash will nevertheless contain the query string ?name=value, so the first half of the above union will evaluate as false, even though it should be true.

Here's another query string issue to tack onto #4777.

@ldeluca

@gabrielschulhof looks like you referenced this issue in a commit. Was it fixed and just never got closed by the system? Asking in case this is one of those issues that got lost since it's over 2 years old. :)

@gabrielschulhof
Collaborator

I guess this prevents us from testing a certain set of initial circumstances via the sequence tests, but is otherwise expected behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.