Switching to Capacitor - Part 2

My main reason for switching to Capacitor is the improved support for building PWA’s, and I have added web as a platform, but when running the app with

npx cap serve

Ionics platform module reports the platform as android.

In Ionic3 I have used the following for detecting the type of platform (web or native)

isApp = !document.URL.startsWith(‘http’) || document.URL.startsWith(‘http://localhost:8080’)

and it seems still to be the solution, or are there a better solution?