optimize encoded URL length