3 ms·
Nobody writes and maintains fully individual HTML pages, everyone uses partials/templating with server-side code (perl, php, python, ruby, js) since about 1999.
by hipadev23 2y ago
Nobody writes and maintains fully individual HTML pages, everyone uses partials/templating with server-side code (perl, php, python, ruby, js) since about 1999.
The only difference between SSG and dynamic backends is the point in time that you're generating cacheable static content.
- lapcat 2y ago> Nobody writes and maintains fully individual HTML pages I do. Partying like it's 1999.
- randomdata 2y agoIt ain't no 1999 party if you aren't using frameset to provide the shared page elements.
- 6510 2y agoI fool around with it a while back with modern js framesets are actually good. They feel much more like real applications and are much easier to work with than the dynamic js rolercoaster. Say you have a menu + banner at the top. It's its own document. looking at the source it all makes perfect sense. The css only affects this frame so you can just target the links image or list items directly without a class or id. Then you click on the links (at the top) and they open different side menus that are also amazingly simple documents. Clicking on those opens all kinds of things in the main area. PDF images, video, widgets, error pages, EVEN DIFFERENT DOMAINS! Or [say] music, in a small frame on the side. The big frameset issue was that the address bar didn't show a useful url and opening a link in a new tab was a problem. These are now easily fixed by pushstate and you can also rebuild the frameset in a new tab if the user tries to open a link in a new tab. As there is nothing dynamic about the documents they are easily cached. Clicking around feels like an application! You can also reuse the side menu frame to open diagrams and charts to accompany the text without scrolling up and down like a madman. On mobile you simply don't load the frame set. The menu is the mobile application. We also got <details> and <summary> adding even more dept to the menus entirely without js. I still have to one day make a website with it.
- tmcdos 2y agoIs not there a problem to have a popup menu from the top frame that will cover and overlap the main frame? As far as I know, frames can overlap only their parents - but not their siblings.
- 6510 2y agoI'm not sure what you mean, are you referring to iframes perhaps? I mean framesets.[0] The top arguments here[1] are: > 1) Frames prevent users from properly bookmarking pages. Not true anymore since we have History.pushState() and History.replaceState() > 2) Frames present challenges for printing web pages. This is just funny in 2024. > 3) Users coming from search engines may not have access to navigational elements if they are located in another frame — they are directed to only that frame the search engine found the text in. The top page is actually so simple that if pages that should be framed are loaded on their own they can can just act like a frameset and load themselves into one of the frames[2] (or redirect to the frame set) if(window.self == window.top){ frameset = document.createElement('frameset'); frameset.setAttribute('cols', '50%, 50%'); frameset.innerHTML = ` <frame src="https://example.com" /> <frame src="https://example.com" />`; document.body.replaceWith(frameset); } [0] - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frameset https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fr... [1] - https://stackoverflow.com/questions/4263509/why-are-frames-deprecated-in-html https://stackoverflow.com/questions/4263509/why-are-frames-d... [2] - https://jsfiddle.net/2ahc0orm/ https://jsfiddle.net/2ahc0orm/
- kevin_thibedeau 2y agoI've created hand written microsites. The only generation is a script that inlines all media files as base64 data.
- doublerabbit 2y agoAnd this should be the way. Having base64 images within a document encoded saves so much faff of CDNs, excess latency and bandwidth. Gives greater control and more archivability. Sure the page file size jumps up but web servers enjoy serving large files. Your not losing anything else, you would still be serving xMB from some image service. Possibly double. If we can serve 8mb SPA applications, we can serve 8mb Base64 images within html files.
- deleted 2y ago[deleted]
- slyfox125 2y agoIt also makes archival/saving much simpler/easier.
- slyfox125 2y agoWith the added benefit of reducing overhead and complexity.