our website is SPA, so only first request is loading the whole page with css/js stuff. every next load is an ajax request. the initial request caches the whole site as expected. code is:
{layout="ech:base/.base_ech"}
{layout:set name="meta"}
{exp:social_tags description="Start | Energy"}
{/layout:set}
<!-- load data for home -->
{stash:embed:ech:stash_featured stash:rubricid="0" stash:limit="7"}
{stash:embed:ech:stash_entries stash:rubricid="0" stash:hideFeatured="7"}
{stash:embed:ech:stash_disrupters stash:rubricid="26"}
{stash:embed:ech:stash_teasers stash:rubricid="41"}
{exp:stash:parse process="end"}
<!-- featured home section -->
{in:sert:index/.homeFeatured}
<!-- all other entries on home -->
{in:sert:index/.homeBrandnew}
<!-- all other entries on home -->
{in:sert:index/.homeAktuell}
<!-- all other entries on home -->
{in:sert:index/.homeArchive}
{/exp:stash:parse}
{exp:stash:static name="home" refresh="15"}
I find the whole site cached under stashCache/1/index.html Navigating from domain.com to domain.com/site2 and then back to domain.com will overwrite my index.html cache but with missing elements, because we cut them out while loading with ajax.
example:
{if !is_ajax_request}
<!DOCTYPE html>
<html lang="en">
<head>
... // thing not to load with every request
{/if}
loading the landingpage over a XMLHttpRequest will not break the site, but will overwrite the cache for index.php. if I really reload then with F5, the site has no styles, because the cached template has no
any suggestions for static caching and SPA sites?