Page 1 of 1

Back Button Feature

Posted: February 24th, 2023, 12:48 pm
by CathyC
I have a new feature that is needed and wanted to ask what the recommended design is for this.

I have a page which displays a list with many records and has filters to help find the record you are looking for. If you click into one, you are directed to a page for just that record. I want a back button that will return me to the first page. This is made more complex because I want that first page to have all the same filters that were applied before you clicked into the single record and were forwarded away from the page.

I'm working in 5.1 Classic, but I am curious for mvc and classic, what is the recommended design that should be used?

Re: Back Button Feature

Posted: February 24th, 2023, 4:24 pm
by JefferyD
I'm not sure of the recommended way, but you could include a back reference in the query strings and then edit the template to look for that and dynamically apply a "Back to..." link.

Other options I can think of:
  • The standard browser "back" functionality, but I believe we want to shy away from that
  • Storing and retrieving the previous URL and filters in the user's session instead of the back reference query string
  • Storing and retrieving the previous URL and filters in the database instead of the back reference query string
There may be more options that I'm not aware of, but all of these definitely have situational pros and cons.
For example:
  • Using query strings has a character limit
  • The browser "back" feature can cause browser caching issues that desync the page from the server
  • Using the user's session can cause added complexity or reliability issues
  • Using the database can make it difficult to scale and special care would need to be made to ensure stale data is handled correctly and efficiently