the most cross-browser safe method unless the string is broken into chunks at the time of output from backend.