"Most of the law of 'doing business' is found in the decisions of courts. Those cases afford no precise measure of the extent of the activities which may be determinative of whether a foreign organization is doing business in New York for purposes of qualification. Each case must be decided on its own facts."
http://www.dos.state.ny.us/cnsl/do_bus.html
[where "foreign" == not organized in New York, not necessarily overseas]
A server is, arguably, a physical location serving products. Javascript running in a browser is the product served. Going with a tried-and-true car analogy, a state can't tax a car manufacturer because the cars drive on their roads, but they can tax them if they produce or sell cars in that state.
What about P2P systems such as Skype?