Through a crafty use of the string.slice function you can use a negative index to chop off the end of the url. This way you don’t have to check to see if there’s even a query string to chop off—no tedious substring length calculations.
Read more ›