Recently I build a custom related list component.
As we know in related list we always have some navigate lookup fields and the "view all" button which will cause a navigation.
So in my custom component, I also create the navigation field with
But I find out that in standard, after I clicking the "view all" button or a lookup field which cause a navigation, and click "back" button in browser, the previous page will show immediately.
However, In my custom lwc component, If I clicked the either
<a> tag, and click back again, the whole previous page will be refreshed, and all the data/components are loading again.
It is like in standard related list, the previous page is cached, clicking back button will redirect to the cached page which doesn't need loading anymore. In custom component, the previous page is lost and need to be loaded again. Is this some ajax behavior or anything I didn't know?
For a best UE(user experience), I really appreciate it if anyone can give me some advice.
If you need more infomation, please leave a comment, I will update any info I can provide.