As far as I understand it: the “code to remove the address and status bars at the top and bottom of the screen” that you provided only kicks in for iOS if the user saves the website to their Home screen as an icon.
There are JS techniques to hide the address bar (notably using scrollTo) but unless the user has created an icon on their home screen with the functionality from Safari, you cannot remove the toolbar at the bottom of the Safari page.
As far as I understand it: the “code to remove the address and status bars at the top and bottom of the screen” that you provided only kicks in for iOS if the user saves the website to their Home screen as an icon.
There are JS techniques to hide the address bar (notably using scrollTo) but unless the user has created an icon on their home screen with the functionality from Safari, you cannot remove the toolbar at the bottom of the Safari page.