PagerDuty Logo

PagerDuty Blog

Fixing The Back Button: AJAX History And Bookmarks

The Incidents Table is an integral part of tracking and resolving your service issues and downtimes in your PagerDuty account, and it provides smooth UI interactions through heavy use of AJAX. Even though AJAX is a great method for enhancing web applications and providing a great user experience, it unfortunately breaks the browser history stack and bookmarking capabilities. This issue becomes annoying very quickly as you navigate around your account, try to send links to your coworkers, or bookmark a specific sort order, page, or filter in the table.

The fix is a little hack using the browser’s anchor tag for deep linking. Since the anchor tag is used to jump to resources within a page, it won’t reload the page when changed. Different browsers handle anchor change events differently or not at all, and so it becomes quite involved fixing this for different browsers. jQuery Address is a great plugin that handles the different cases, providing a callback for the change event. We’ve added deep linking to the incidents table. The browser will now remember all your interactions with the table as you move throughout your account or recall your bookmarks.

Hopefully this will make it even easier to navigate your incidents. As always, your comments and feedback are greatly appreciated.

Incidents Anchor Tag in Address Bar