Smarter query string for client entry, also works for script