superjadex12
08-05-2006, 08:03 AM
Just asking for a second opinion on my theory.
Say I have 5 cases in a switch statement. And for each case I have a block of 1kb of code. Now if all this code was contained in this page I'd have a 5kb sized php document.
Now say I put my 1kb cases in separate pages and include them via include ()
This would make my main page ~ 1-2 kb. Would this make my page load faster?
The reasoning is 1. the page is smaller and 2. The 4 cases that aren't executed wont include the block of text at all ... ??
What do you guys think ?
Oh yeah and while I'm posting, if php is so good, and free, and powerful, why use any other server side? Obviously for the sake of choice/variety or something, but does any other code have any major advantages ?
Thanks
Say I have 5 cases in a switch statement. And for each case I have a block of 1kb of code. Now if all this code was contained in this page I'd have a 5kb sized php document.
Now say I put my 1kb cases in separate pages and include them via include ()
This would make my main page ~ 1-2 kb. Would this make my page load faster?
The reasoning is 1. the page is smaller and 2. The 4 cases that aren't executed wont include the block of text at all ... ??
What do you guys think ?
Oh yeah and while I'm posting, if php is so good, and free, and powerful, why use any other server side? Obviously for the sake of choice/variety or something, but does any other code have any major advantages ?
Thanks