Ask HN: Tips for Third-party Javascript as a Service?

I've just read Olark's post on the subject[1]. Any good tips?

* How do you make sure your CSS doesn't interfere with the site's css and vice versa? Do you append a style element or another file?

* Do you start executing on DOM ready? Do you defer animations?

* How do you namespace your code? (for example, disqus expects you to just throw variables on the global scope)

* Have you used socket.io? How do you authenticate the connection? (since no cookies are sent)

* Any other hard earned advice?

http://www.olark.com/spw/2012/03/dont-break-the-internet-with-your-javascript/

This post does not have any comments yet