Forum Moderators: open

Message Too Old, No Replies

Code slimming

how far to go

         

ukgimp

1:31 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have been slimming down my pages at the moment to see how far I can go. I have got CSS and external JS and got the pages down to less than 5K, minus the logo image.

Is it worthwile to take this further with say external header and footers. I read somwhere ?? i think that these inc files are inlcuded, but I would like to know for certain.

Cheers

Richard

Knowles

1:40 pm on Jul 12, 2002 (gmt 0)

10+ Year Member



Thats pretty small, I dont think you are going to save that much by pulling the Header and Footer unless you have massive amounts of content in them. If they are always the same you may want to put them as includes since it would make it easier to update the one inc file instead of all the pages.

brotherhood of LAN

1:44 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



.inc files or any other includes won't cut down code bloat, they are already rendered by the time they reach the browser (just check your source code through a browser).

However you may be able to save lots of physical space on your account by using inc files due to the fact that you write a header once instead of 1000 times on a 1000 pages. Might help your site go "faster" with this sorta efficiency :)

Reflect

1:53 pm on Jul 12, 2002 (gmt 0)

10+ Year Member



To determine page weight you need to take into account the source page (duh!), images and any refernces to external files (the size of those files).

Brian

Sinner_G

1:57 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only real advantage of includes is the one mentionned by Knowles, you can save lots of time by using them for repetitive parts of your site (navigation, footers,...)

pageoneresults

2:26 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>5k

That is more than respectable! 5k is a fantasy for most. I'll second the notion about Includes and site manageability.

Nick_W

2:31 pm on Jul 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Agreed. I think you can safely call it a good job at <5k

Try looking into templates in php/asp for serious site management. I've been doing it for ages and it makes editing customers sites a doddle...

Nick