superglue icon indicating copy to clipboard operation
superglue copied to clipboard

When visiting the same page that your currently on... don't history push

Open jho406 opened this issue 1 year ago • 0 comments

When clicking on a link that has data-sg-visit, we push another entry into the window.history.state. This doesn't make sense to do if we're already on the same page we're about to visit.

If we're visiting the same page, we should allow superglue to fetch the data to update the store, but don't history push. Superglue already has a revisit functionality that only gets used in restore strategy.

I think we need to investigate two things with this story:

  1. Can we make use of the existing revisit functionality?
  2. Should we remove the existing revisit functionality to just detect if we're just visiting the same page. Part of me thinks this is the right move since the revisit option was added as an exception to make the restore strategy work.

jho406 avatar Jun 21 '24 16:06 jho406