View Single Post
  #4 (permalink)  
Old April 15th, 2010, 06:21 PM
andypandyrox456 andypandyrox456 is offline
Registered User
Join Date: Apr 2010
Location: Planet Earth
Posts: 70
Thanks: 4
Thanked 0 Times in 0 Posts

Originally Posted by chroniclemaster1 View Post
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.

I know perfectly well about templates.
My questoin was different, but I believe i found the answer.
Reply With Quote