4 ms·
That's exactly what iframes are designed to do. Though they do have... downsides
by cobbal 2y ago
That's exactly what iframes are designed to do. Though they do have... downsides
- vaylian 2y ago<iframe> doesn't work inside <head>.
- taeric 2y agoTrue, though you probably only need to invert some relationships to get the same behavior. Instead of a page including the header it wants, you have it iframe the content you want. Your landing page, then, can use javascript to pull out the location to know which page to include. Functionally, it would be about the same? Caching would even largely go the way you want it to with it hitting the main layout page first, and then pulling in the content pages. Edit: Amusingly, this organization strategy also provides a relatively easy way to try out other layouts. Since you can make a new driver page that iframes in your content.
- ffsm8 2y agoSure, but the <head> doesn't go into the body DOM either? Pretty sure header.html was supposed to be the navigation/menu and similar, so that wouldn't be in the <head> either
- vaylian 2y agoMany pages have the same <link rel="stylesheet"> and <script> tags which affect DOM content inside the <body>.