The user sees a paginated table of items. For each item/row there is a checkbox to the left that lets the user select that row.
Below the table a button: "Compare selected".
The user can select several (more than two) rows and click "Compare selected" to go to another page that compares the selected rows.
What is the best way to handle that the user wants to compare a row on page one and page three? How do I indicate that the row that was selected on page one is still selected when the user displays a different page?