I’d like the view implementation for my login page to detect if its page has been downloaded via HTTPS. Then it could warn that login won’t work unless the whole site is served via HTTPS, due to my checks on the server side and due to it being generally unwise. And it could avoid sending any password via regular HTTP.
Is there any way to do this in GWT client code without writing some Javascript?
Yes. This test should do it:
Window.Location.getProtocol().equals(“https”)