Back Button Feature

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Back Button Feature

Unread post 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?
word count: 128

Tags:
JefferyD
Posts: 178
Joined: August 31st, 2021, 11:37 am
Contact:

Re: Back Button Feature

Unread post 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
word count: 178
Post Reply