Javascript URL Strings
Here's a simple trick I found while looking at some JS library source code today.
If you need to specify a url such as "http://domain.tld/path" in javascript code, some parsing engines may error out with an unterminated string exception after they hit the // and switch into comment mode.
To prevent this, split the string into two parts as shown below.
var url = "http:/" + "/domain.tld/path";
