Fix html issues. Cache trail json requests