       if window.location.hash.substring(0, 2) == "#!" && @find(window.location.hash.substring(2))
         forceUrlUpdate = initialUrl = window.location.hash.substring(2)
     else
-      if window.location.hash == "" && @find(initialUrl)
-        if @hashBaseUrl && @hashBaseUrl != initialUrl
-          window.location.pathname = @hashBaseUrl + "#!" + initialUrl
-        else
-          window.location.hash = "!" + initialUrl
-      if window.location.hash.substring(0, 2) == "#!"
-        initialUrl = window.location.hash.substring(2)
+      if @hashchangeSupport
+        if window.location.hash == "" && @find(initialUrl)
+          if @hashBaseUrl && @hashBaseUrl != initialUrl
+            window.location.pathname = @hashBaseUrl + "#!" + initialUrl
+          else
+            window.location.hash = "!" + initialUrl
+        if window.location.hash.substring(0, 2) == "#!"
+          initialUrl = window.location.hash.substring(2)
     @renderUrl(initialUrl)
     if forceUrlUpdate
       @updateUrl(forceUrlUpdate)

      if @pushStateSupport
        history.pushState({ }, document.title, href)
      else
        window.location.hash = "!" + href

  addListener: (element, event, fn) =>
    if element.addEventListener  # W3C DOM

      @init = false

  attachClickListener: =>
    if @pushStateSupport || @hashchangeSupport
      @addListener document, "click", (event) =>
        target = event.target
        if( target && target.tagName == "A")
          target.href = target.href # fix for IE
          if !@metakeyPressed(event) && @targetAttributeIsCurrentWindow(target) && @targetHostSame(target)
            href = target.attributes.href.nodeValue
            @log("Processing click", href)
            ret = @exec(href)
            if !ret
              href = target.pathname # try with full path name
              ret = @exec(href)
            if ret
              @log("New url", href)
              event.preventDefault();
              @previousView = href
              @updateUrl(href)

  metakeyPressed: (event) =>
    (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey)
