|
Posted by Joel Shepherd on 11/02/05 18:39
In article <zZOdnYTvp5EvL_XeRVnyjA@giganews.com>,
"Jemdam.com" <noemail@nospamplease.com> wrote:
> >
> > What are you talking about??? Why would anyone use PHP for link color
> > and/or size changes? That makes no sense whatsoever.
> >
> > Use CSS. There are excellent tutorials all over the internet.
>
> Diffenece of veiws I think. If you have a PHP page why not? If you just have
> HTML then you are right it would not be worth it. The advantage of the PHP
> solution is you user just gets the rendered HTML which can often be lighter
> than CSS.
I think someone already suggested the math here doesn't work out.
Putting 'alink' and 'vlink' attributes in an anchor tag adds ~25 bytes
to each tag. If you have a site with two dozen pages, and, say, 10 links
per page, you're looking at 6k of repetitive data ... just to set the
link color. Or, you can use ~150 bytes in a style sheet that gets sent
_once_ to the client and cached. That's 40x less data/bandwidth when CSS
is used. Now, how is HTML (generated by PHP or not) lighter than CSS
again?
> I guess it depends on how much traffic you expect. The download is
> the weak link, the server CPU is not ...
Maybe in your world, but that's certainly not always the case. A
sufficiently large, complex, or highly-visited site can easily tap out
available CPU power.
--
Joel.
Navigation:
[Reply to this message]
|