Open Viiprogrammer opened 2 years ago
@Viiprogrammer Could you explain this a little bit more?
With ajax navigation no page reload needed (when you click to the link it load content of page / page with fetch
or XMLRequestHttp
and insert getted HTML to current page HTML, after this push new url to browser history.
Examples of realization:
https://habr.com/ru/post/154617/ (available in Russian only :( )
https://stackoverflow.com/questions/2586661/url-navigation-in-an-ajax-based-website
https://developer.mozilla.org/en-US/docs/Web/API/History_API/Example
Oh.. I think it is something like SPA (Single Page Application).
Do you have any opinion/recommendation on how to implement this?
yes, this technology was before spa and even now it is, where there is no spa, but unlike spa, it is usually there where ssr is used and it is easier to integrate it into any application, it is not necessary to rewrite it on spa
the only thing that is possible after «go to new page» with ajax is to call a couple of functions to initialize code highlighting and other things for the new HTML
@Viiprogrammer does it mean that now we have to export files in .php
, if so then it will change the overall workflow.
I have very limited (or no) knowledge of ajax navigation.
I thought to do it without a backend (without php, node...) because there is no need for a backend, it will greatly complicate life) and will not give any profit
maybe it has some other name besides ajax/pjax, but I never thought about it
11ty may be what you're looking for?
@backspaces @Viiprogrammer I am working on a new version of clean-jsdoc-theme in which I will use next js. Do you have any opinions?
I have created a repo to test the possibilities. https://github.com/ankitskvmdam/clean-jsdoc-next
I don't use React so don't know it's advantages. 11ty is so dead simple yet quite powerful especially for multi page apps. Otoh if you are looking for ready made components, React may be a win,
@backspaces @Viiprogrammer I am working on a new version of clean-jsdoc-theme in which I will use next js. Do you have any opinions?
I have created a repo to test the possibilities. https://github.com/ankitskvmdam/clean-jsdoc-next
I was thinking about Vue / React options, but they have a problem in that they need SSR if you need to get Server side render and at the same time keep what SPA has.
Maybe It's possible to get both without actually rendering on the server side with Svelte But I have never used Svelt and don't know for sure if there are any problems
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Add AJAX navigation for menu /
@link
and other linksAdditional context
It's a little more convenient than page reload transitions, and on mobile it's faster and a little more economical.