[sw] fix view not shown issue when refresh the page