6 ms·
Coming from the other side (as a dev): I'd love to use much less JS in my pages. A static portfolio shouldn't require JS. However, the reality is that a complet
by laura-media 4y ago
Coming from the other side (as a dev): I'd love to use much less JS in my pages. A static portfolio shouldn't require JS. However, the reality is that a completely static HTML page written by hand is hard to maintain, and browsers disliked the idea of reusable components without big frameworks like Vue or React, loading them into the DOM dynamically.
- jraph 4y agoHTML pages can be generated server-side. I happen to have developed a portfolio in PHP in the past. There's some optional JavaScript to make it smoother by avoiding unnecessary a page reload for each picture, but it works without (by reloading the page). Unfortunately, it requires some extra work but I think it's worth it. The rendering part is not duplicated though, there just needs to be some JS code intercepting links being followed and downloading the updated part from the server.
- laura-media 4y agoIn that scenario, you'd need to manage even more modules for hosting your page. There is sadly no proper solution for static pages as far as I know, at least since HTML imports were shot down.