You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
As part of #94, we're changing the way ajaxified pages are dynamically injected on the page.
To adapt to this change, the server needs to render the shell of the page (the reusable markup shared across all pages) as it is today. However, to server-side rendering on the initial page load, the server needs to now populate placeholder <template>s with a the correct partial .html file.
For example, when loading about.html, the server would render the index.html template and also populate the 2 template placeholders with the pieces of template/about_partial.html:
<template id="template-content-placeholder" ref="">
innerHTML of about_partial.html's <template id="template-onsite-content">
</template>
It would also fill <template id=“template-about-masthead”>.
Upon user navigation, ajax injection takes over an the ref of each template is updated to the new page. Whatever the server rendered in template(s) on initial page load is no longer used :)
This setup will also allow us to remove one request on page load. We won't need to populate the templates on the client, the server will take care of it. SEO and speed friendly!
We currently have placeholder pages (about.html, schedule.html, onsite.html) that also need to be removed in favor of the server rendering the correct page.
As part of #94, we're changing the way ajaxified pages are dynamically injected on the page.
To adapt to this change, the server needs to render the shell of the page (the reusable markup shared across all pages) as it is today. However, to server-side rendering on the initial page load, the server needs to now populate placeholder
<template>
s with a the correct partial .html file.For example, when loading about.html, the server would render the index.html template and also populate the 2 template placeholders with the pieces of template/about_partial.html:
It would also fill
<template id=“template-about-masthead”>
.Upon user navigation, ajax injection takes over an the
ref
of each template is updated to the new page. Whatever the server rendered in template(s) on initial page load is no longer used :)This setup will also allow us to remove one request on page load. We won't need to populate the templates on the client, the server will take care of it. SEO and speed friendly!
We currently have placeholder pages (about.html, schedule.html, onsite.html) that also need to be removed in favor of the server rendering the correct page.
@devnook
The text was updated successfully, but these errors were encountered: