simplified route and page parameter serialization
for javascript on pages