           data[k] = v
         else
           delete data[k]
-      location.href = "#" + $.param(data) if changed
+
+      if changed
+        fragment = "#" + $.param(data)
+        if replaceState || location.hash == ""
+          history.replaceState(null, "", fragment)
+        else
+          location.href = fragment
 
     viewDisplay: (view) =>
       @setDateTitle(view.title)

        $.fudgeDateForProfileTimezone(new Date)

    setCurrentView: (view) ->
      @updateFragment view_name: view
      @currentView = view
      userSettings.set('calendar_view', view)


      (new EditEventDetailsDialog(event)).show()

    updateFragment: (opts) ->
      replaceState = !!opts.replaceState
      opts = _.omit(opts, 'replaceState')

      data = @dataFromDocumentHash()
      changed = false
      for k, v of opts
