Forum Moderators: coopster

Message Too Old, No Replies

"sticky" header/side bar content that doesn't reload

does anyone know how to accomplish this?

         

internets

3:54 am on Dec 13, 2005 (gmt 0)

10+ Year Member



I am looking at a site right now that uses PHP and modern CSS to produce a page with very clean, simple, well-structured HTML. The very slick thing that it does is that when I click from page-to-page on the site, only the stuff in the "main content" of the page appears to "load" -- the header and sidebars do not reload. They remain completely unaffected.

I think this is a really awesome technique, and I'm not sure how it is accomplished. Is it PHP? Is it CSS? I know it can be done with technologies such as AJAX, but this page is much too clean and simple for that.

Any thoughts on how this valuable, user-friendly technique is implemented?

internets

3:55 am on Dec 13, 2005 (gmt 0)

10+ Year Member



It goes without saying that frames are not used. Just to clarify.

whoisgregg

4:25 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What happens in the address bar? When you click to a new page, does the URL change?

When you click to a new page and "View Source" are you looking at the structured HTML for that page content?

internets

4:58 pm on Dec 13, 2005 (gmt 0)

10+ Year Member



Yes, and yes. The url changes to newpage.php and the source code pertains to that page, including the header and sidebar.

whoisgregg

5:18 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I took a look at the site and it is actually reloading. It's just that the pages are so small and all the other elements (css, images) are also small (and cached) that the browser is drawing it fast enough to not tell that it's being reloaded.

When the page template is identical, the browser does a faster job of redrawing subsequent pages.

AJAX *cannot* alter the page's source code. It can alter the rendered code on the page, but "View Source" always remains the same.

internets

5:24 pm on Dec 13, 2005 (gmt 0)

10+ Year Member



Wow, it's really impressive what effect extremely light code has. Obviously most sites recycle the header/sidebar from page to page, but it almost always has the effect of "reloading," where there's at least a brief flash in between pages. This site remains perfectly still, and it's only the new content that "appears" to load (on my high-speed connection, anyway).

Now, all that said, *is* there a way to keep parts of the page "frozen" without using frames?

Thanks for having a look!

whoisgregg

8:45 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow, it's really impressive what effect extremely light code has.

And how different having a high speed connection is compared to a dial-up connection. ;)

whoisgregg

9:06 pm on Dec 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Now, all that said, *is* there a way to keep parts of the page "frozen" without using frames?

Short answer, not yet.

Long answer, people have done it. It looks like some AJAX pioneers have deciding that they will use the hash (#) portion of a URL to designate the different "pages" of their AJAX applications. Then to get those URL's in the browser they have hidden iframes that get refreshed to populate the browser history and push the new URL into the main page. So, yeah, there is a way, but I would not call it ready for primetime.