Smart Hosting for Single Page Apps