mobile browser URL hiding: mark it as mobile-web-app-capable

It seems that both Safari on iOS and Chrome on Android support the following meta:

<meta name="mobile-web-app-capable" content="yes">

In such case if the user pins a web page to a home screen, the web is opened without an URL bar. This would be very helpful in landscape mode on a phone.



I tried that, but I was unable to convince Kiwi or the browser to reload my modified index.html. I tried to edit /root/src/Beagle_SDR_GPS/web/openwebrx/index.html and index.min.html, I tried to restart the Kiwi server, I even restarted the whole Beagle, I cleared the page cache using the browser debugging tools, but I am still receiving an unmodified index.min.html. After reboot, both index.html and index.min.html get overwritten, likely by pulling from git. After kiwi server restart the files are intact, but Chrome debugging tools still show the old html source. What I am doing wrong?

Thanks, Vojtech OK1IAK

Comments

  • So you can't edit any file loaded by the browser (e.g. *.html, *.css, *.js) and then simply restart the server. It doesn't read those files from the filesystem due to realtime constraints.

    All of those files are compiled into the server program itself and served from main memory for maximum speed and least latency. So you have two options:

    • Change the files and do a "make install" and server restart (slow): cdp; mst; mdi; m; mi; ku
    • Stop the background (daemon) execution of the server and run it in foreground (debug) mode where the actual files will be read instead of the compiled versions. This is the fast edit-compile-debug development mode that I use when making changes (cdp; mst; mdi; ./d; ... ku)


  • Thanks, it helped a lot.

    I can confirm that adding the meta at the top of the web page (openwebrx/index.min.html)

    <!DOCTYPE HTML> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta name="mobile-web-app-capable" content="yes">

    allows the application to be pinned to home screen (on Android) or to start menu or dock (on ChromeOS) and when opened on Android, the URL bar is gone. On Android, the window acts as a standalone application then, so it is no more a tab in Chrome but it has its own window in task switcher. On ChromeOS, I have to check "open in its own window" when pinning. On ChromeOS, I am not quite getting rid of the URL bar. I suppose the URL bar will not go away because it has to show the "insecure http" message. If the page was served with https, I suppose even on ChromeOS the bar would go away. I suppose Kiwl will work in a similar way on iOS.

    I am satisfied with the result on Android, Kiwi is now usable on my 6 inch display in landscape mode.

    Please add the meta to the official sources.

    Thanks and 73,

    Vojtech OK1IAK

  • Yeah, there's going to have to be a lot more testing before I make a change like that.

Sign In or Register to comment.