View Single Post
  #3 (permalink)  
Old April 14th, 2010, 01:45 PM
chroniclemaster1 chroniclemaster1 is offline
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

The best way to deal with this is simply to use one generalized page structure for the entire site which includes a customizable content section. Then modify the content portion of the page for the purpose of each specific page. When you download the first page of the site, it needs to take time to draw in the CSS / JS files and all the images in the generalized template. The second page they visit (and ever page thereafter) already have all this material and only need to load any new files or images on the new page (ie stuff which wasn't already on the first). This makes the page appear to load much more quickly and can even beat AJAX in some cases because it doesn't require any scripting.

Otherwise, if you are trying to retrieve just a portion of a page and update it into a file, you have to use AJAX. Just keep in mind that this is significantly more complicated, and worse, you destroy your ability to use the forward and back buttons on the browser the way you'd expect. AJAX is really cool, but there are problems which is why I'd only resort to it as a backup choice if you can't use a template.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
Reply With Quote