I re-checked and have similar connected (as ap) details as in your inclusion. My browser refuses to connect when using 192.168.4.1 typed into the URL addr field, but is compliant when using the after the fact known 192.168.1.71 IP.
I've been using your example along with modifications that are at the 'Internet' page that Ollie pointed out. Each time, the browser page only pops up when the browser is pointed to the exact IP (192.168.1.71) that can only be detected after inspection of the 192.168.1.254 router table. I'm attempting to get a page to render at 192.168.4.1 as the IoT device powers up, just as a PC or TV might connect as they power up.
Am I to understand from your last response, that it is not possible using the current version of Espruino, unless one hard codes the values in script or does a 192.168.1.254 router lookup first to then type in that IP addr into the browser addr field?
Could the development platform be the issue. I believe Ollie uses a Mac, I'm using Windows 10 What development platform is you PC?
by default the AP is active, use this calls to check
A browser connection to 192.168.4.1 will only work if are attached to that AP and when added code like Ollie pointed out above.