Forum Moderators: open

Message Too Old, No Replies

A cool trick, but how to do it?

         

2w2w2w2w

12:19 am on Jan 29, 2007 (gmt 0)

10+ Year Member



Hey guys, I'm a new web designer trying to learn dreamweaver. I am creating a website of 20 pages based on a template that has the stonehendge layout with two columns and the banner on top. And in the middle in between the columns is the 'main content area', which will vary from page to page. My friend suggested I could save bandwidth if I only reloaded the 'main content area' so that the columns and banners (where all the .imgs and links are) did not have to be loaded every time a user clicked a link. This sounded like a neat trick to me but without using frames I did not know how to do it. So I was wondering if you could help me to find a way to replace the <DIV> of the main content area with an external page's <DIV> main content area tag. How do I swap the DIV's?

Please help. Thanks!

tedster

12:55 am on Jan 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello 2w, and welcome to the forum.

There are some possibilities with javacript and css. But if you care about traffic from search engines, then you're much better off loading an entire and separate html document for each bit of content. Otherwise your website ends up looking like there's only one url involved. All your content "belongs" to just that one page -- or worse yet, it's not indexed at all.

martinship

7:26 am on Jan 29, 2007 (gmt 0)

10+ Year Member



My friend suggested I could save bandwidth if I only reloaded the 'main content area' so that the columns and banners (where all the .imgs and links are) did not have to be loaded every time a user clicked a link.

Web browsers are already doing this for you. The good news is that images are cached. So if all of your pages call the same background graphic, the browser will only download it once (per session, usually) depending on user settings.

On the topic of text: I'd say there will be no measurable bandwidth savings by only loading the navlinks once, as the file size of text is tiny. You might look into gzipping the pages if you want to make the file size (and thus bandwidth usage) of the text pages smaller.

2w2w2w2w

9:34 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



tedster

Awesome knowledge bro. Thanks for the insight, I had no clue that the search engine would treat it as a single webpage. Since I want to be nicely indexed you make me think twice about the style of my website. For curiosities sake, do you know any Javascript or CSS codes that could do it anyways? It would be a nice little tidbit of knowledge for me as a growing web designer. Thanks again.


martin

You made a very interesting point. If I understand it correctly you are saying that most new browsers will store and reuse any redundant images, for each user session. This is a very cool feature for us bandwidth scrooges! I wonder what percent of average users (varies from target market to target market I'm sure, but still, on average) have a browswer with the settings for this cool feature to save us on bandwidth. Any ideas on a ballpark figure?

Thanks so much to both of you. Lovely forum with great posters!

Philosopher

9:46 pm on Jan 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The browser caching is a default feature on virtually every current browser so the answer to your question on the percentage of users that will use that feature is roughly 99%-100%.

2w2w2w2w

10:47 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



Awesome Phil, thanks for the help.

cmarshall

11:28 am on Jan 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



do you know any Javascript or CSS codes that could do it anyways?

AJAX would do exactly that. Long before XMLHTTPRequest was called "AJAX," it was used by galleries to cycle images within a page, which was pretty much what you want. I remember using it, but eventually discarding it because of browser incompatibilities (no longer an issue these days).

However, as has been pointed out, there are significant disadvantages to doing it this way. I won't say don't use this technique at all, but it should certainly not be used for the entire site. You may want to consider using it for sections that can appear to search engines as atomic units (like gallery main displays).

webtrix

8:34 am on Feb 1, 2007 (gmt 0)

10+ Year Member



excellent information above. for the indexing problem just create a template, and only change the content. all pages will be different pages, but the template doesnt move. works like frames, without the headache.

Status_203

9:20 am on Feb 1, 2007 (gmt 0)

10+ Year Member



works like frames, without the headache.

Same headaches. Bad for SEM, bad for bookmarking.