Help - How to prevent view to be stacked in history

Hi guys,
I would like to know if is possible to prevent the creation of “back page” when I click on a link.
I’ve got a product page in a viuew and in the page there are some link to the variants.
variants uses the same view so when I click i see these hide page are created:

I would like to know if is possible to prevent this behaviour for this view.
Or if there’s a doc about.

Thansk in advance and kind regards,


1 Like

Check this out. It explains why Ionic does what it does.

Hi @twestrick I read the motivations.
But how can manage this situation:

  • I navigate through several pages and I never use the back button. So when I change tab or I return to the root of my navigation the pages I created cannot to be removed because I didn’t use the back button.

It’s there a way or some examples to prevent this situation?

Thanks in avdance and kind regards,


I don’t fully understand what the issue is that you are trying to solve. However, you should be able to use router.replace instead of router.push to not a have history trail.

There is also Ionic’s router utility documentation.

1 Like

The issue is that I want to prevent to have a lot of hiding pages in the dom avoiding performance lack for example.

Thanks again!