I have a long list of contacts - clicking on a contact, takes the user to a page where they can view the contacts details. When the user clicks "return to list", I look up the value of a cookie to determine the last viewed contact and highlight them by applying a CSS class to that row of the list.
However, often the user will then click back button on the browser rather than my link.
Is there anyway we can get the record to be highlighted? I have tried setting the selected row via the following jquery:
target = $.cookie("lasteml");
However, this only reverts to the state the list was in when originally loaded, rather than showing the last clicked item.
I've also tried preventing default on the click, adding the highlight class and then redirecting the users - however again, when back is pressed, we return to the page in its original state.
Is there a way around this?
I would prefer not to disable cacheing if possible (but if that's the only way, I'll have to do it that way).