 # Returns true if the hash portion of the URL changed between the history entry
 # (entry) and the new URL we want to inspect (url).
 hashChange = (entry, url)->
-  return false unless entry
-  return /^https?:/i.test(entry.url) && entry.url.split("#")[0] == url.split("#")[0]
+  unless entry
+    return false
+  [aBase, aHash] = url.split("#")
+  [bBase, bHash] = entry.url.split("#")
+  return aBase == bBase && aHash != bHash
 
 
 # DOM Location object

      name = @current.window.name
      parent = parentFrom(@current.window)
    if @current && @current.url == url
      # Don't change history, but do reload the page.
      this.reload()
      return

    if hashChange(@current, url)

    if @current
      url = HTML.resourceLoader.resolve(@current.window.document, url)
      name = @current.window.name

    if hashChange(@current, url)
      window = @current.window
