With an Arduino that is serving a web page one can use mDns instead of keeping track of the local IP address.
Add this to your Setup():
MDNS.setInstanceName("count server demo");
MDNS.addService("http", "tcp", 80);
Then that webpage is available locally in chrome and safari as: http://esp32.local./
I didn't test the other browsers.
I'm sure this works for a Pi also even though I haven't tried it yet. mDns might be on by default.
The url would be http://raspberrypi.local./
To check, try this command: dns-sd -B _http._tcp
When I do that I find that both of my printers are serving http (a supply level page) in addition to the microcontroller.