Question:
Ive noticed some sites, (Like Microsoft Teams, or Microsoft 365 for example) that have this "Smooth HTML Transition" effect, that causes the site content to stay loaded when opening a link, and only the inner content is updated.
ETC:
What I'm asking is, does anyone know how this effect is created, and if so, does anyone know exactly how to make it myself? For example, my website has a top navigation bar that is present on every single one of my pages, except the debug panel, but that is not a page I care about, so what I want to see is my topbar and page background staying loaded, but the content in my <body>
to update.
Requirements:
Not much here, I just want an effect that keeps my HTML from unloading and reloading if I open a link to a page similar to the main index.html of my site core, so that only the inner content updates.
Bonus:
I also noticed sites like the ones I mentioned above, can "somewhat run offline" and seem to cache their files into the computer, as if I go to microsoft 365 on my school laptop without wifi, I open the site and it loads, but it just shows "Sorry, No Connection"
Edit: I found out its related to AJAX, sadly Im using Github Pages, so if theres a solution for that with Jekyll or another static library/tool, id appreciate it
Question:
Ive noticed some sites, (Like Microsoft Teams, or Microsoft 365 for example) that have this "Smooth HTML Transition" effect, that causes the site content to stay loaded when opening a link, and only the inner content is updated.
ETC:
What I'm asking is, does anyone know how this effect is created, and if so, does anyone know exactly how to make it myself? For example, my website has a top navigation bar that is present on every single one of my pages, except the debug panel, but that is not a page I care about, so what I want to see is my topbar and page background staying loaded, but the content in my <body>
to update.
Requirements:
Not much here, I just want an effect that keeps my HTML from unloading and reloading if I open a link to a page similar to the main index.html of my site core, so that only the inner content updates.
Bonus:
I also noticed sites like the ones I mentioned above, can "somewhat run offline" and seem to cache their files into the computer, as if I go to microsoft 365 on my school laptop without wifi, I open the site and it loads, but it just shows "Sorry, No Connection"
Edit: I found out its related to AJAX, sadly Im using Github Pages, so if theres a solution for that with Jekyll or another static library/tool, id appreciate it
Share Improve this question edited Oct 11, 2019 at 13:10 Mister SirCode asked Oct 11, 2019 at 11:15 Mister SirCodeMister SirCode 1135 bronze badges 6 | Show 1 more comment1 Answer
Reset to default 1What you are referring to is typically a combination of ajax and pushState. It's a nifty effect and can add value to the end-user experience.
I deployed it on a WordPress site I built a few years ago (take a look here).
I used a JavaScript library called Smoothstate that has fairly good docs (at least to get the basics up and running).
You can see an answer I posted a few years ago about Smoothstate, that explains how to set up your JQuery so that it fires when a page transition completes.
<a>
link tags? not sure if this has anything to do with WordPress if you are using GitHub Pages? though it would be a fun project to make a plugin that does this kind of this automatically. – majick Commented Oct 11, 2019 at 13:19