@juhoteperi: thank you very much indeed!!!
Was briefly wondering what this paho thing is but in retrospect I should have known, haha!
@thomas: btw. have you checked: https://github.com/mqttjs/MQTT.js? I was checking if paho.mqtt had any bugs about minified js and noticed it is not very actively maintained
though looks like paho.mqtt only just moved to github
@juhoteperi: I was kinda aware of the fact that there are other implementation of MQTT in JS. I used the Paho one as that is “official” one sanctioned by the Eclipse project. And yes it does look a bit dead, but as far as I know they are working on a newer version of the spec.