optimize long url for loader. Fixes #611