Member Avatar for Member #453901

I've heard some people say they don't like to use frames, but for me, I always use frames for the sidebar, or menus so that I don't have to change every page individually everytime I need to change the sidebar.
Is there anything besides frames that I could use to make it easier?
And what are the ups and downs of frames?
Thanks

Dani AI

Generated

Frames are best avoided for site layout. They create separate scrolling contexts, break bookmarking and back-button behavior, hurt printing and accessibility, and complicate search indexing. The sidebar disappearing at the end of the page is exactly the kind of UX problem frames introduce: the sidebar sits in its own frame and does not participate in the main document flow. Building on and , the modern, maintainable pattern is a single HTML document with a shared template or partial for the sidebar so the markup is edited in one place.

The "permission denied" error with iframes most often comes from browser security: same-origin policy or embedding being blocked by response headers (X-Frame-Options or Content-Security-Policy frame-ancestors). Useful diagnostics are the browser console and the network/response headers. Relevant references: Same-origin policy and X-Frame-Options / frame-ancestors (and the CSP variant).

Practical options: use server-side templates/partials (master layouts) or a lightweight static-site build that injects the sidebar at build time; if the host supports it, server-side includes are an easy, low-overhead option. For pure client-side approaches, fetch the shared HTML and inject it (same-origin only) and provide a server-rendered fallback for SEO/accessibility. For layout, Flexbox or Grid keeps the sidebar in the normal flow so it grows with content instead of being clipped. Example layout pattern (simplest form):

<div class="wrap">
  <aside class="sidebar">Sidebar</aside>
  <main class="content">Main</main>
</div>

<style>
.wrap { display:flex; align-items:flex-start; }
.sidebar { width:240px; }
.content { flex:1; }
</style>

Recommended Answers

All 3 Replies

Member Avatar for Member #453901

What is asp.net?
Also, I've heard about ssi but I'm not sure how it works.
I've tried using iframes but it doesn't seem to work, it gives me an error message that says the error is "permission denied". If I could get iframes working, would they be better than frames to use? The problem I have with frames is that my sidebar is longer than the page so it just dissapears at the end of the page.
Is there any other alternative?

Yeah use a serverside language like PHP or ASP and then have a content management system using a database

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.