There are some options to open a new page or redirect page in GWT, & I don't know which one is the best?
-Option 1: will redirect the current page to a new page but not opening a new tab.
String url = Window.Location.createUrlBuilder().setHash("!search").buildString();
Window.Location.assign(url);
-Option 2: open a new page on a new tab.
String url = Window.Location.createUrlBuilder().setHash("!search").buildString();
Window.open(url, "_blank", null);
-Option 3: will redirect the current page to a new page but not opening a new tab & retain the states of the previous page
PlaceRequest request=new PlaceRequest(NameTokens.search);
placeManager.revealPlace(request);
In Option 1 & 2, it seems that the system starts to reload the whole page. For option 2, if you press Back button then it will reload the previous page again.
In Option 3, it seems that it does not reload the whole page (ie if you have a header then it won't download the header again). Therefore, it run very fast. If you click Back button then it won't reload the previous page so you can still see all the existing states of the previous page.
Option 3 is quite fast. However, we need to properly reset some variables in the previous page otherwise it will make thing really messy and error-prone.
What is the best practice for open a new page or redirect page in GWT? Which option should we use?