common web client code