What is the origin and scope of usage of the phrase "So long...." used to bid goodbye?

Solution 1:

The OED gives a first use in 1865. No explanation is given, but comparison is made with German so lange. It is a purely colloquial expression, and one that seems to be limited to particular idiolects. I wouldn’t use it myself. It may be more common in American than in British English.