v1rtl
teen webdev
- Local time
- 18:27
- Joined
- Oct 10, 2019
- Messages
- 25
- Pronouns
- bruh
It is better to use client side router so browsing in Webwide will be smooth and comfortable. Now we have to wait until each page to load which is not very awesome because it is a bit annoying.
The solution to this problem is using JavaScript-based client side routing. There are some framework-agnostic libraries here:
and even an article on how to build your own router:
Router with vanilla JavaScript
There is also InstantClick that doesn't require any bundling
HTML:
<script src="instantclick.min.js" data-no-instant></script>
<script data-no-instant>InstantClick.init()</script>
Last edited:
Upvote
0