RE: [PHP-DB] CSS versus Includes

From: Date: Mon, 02 Apr 2001 05:38:49 +0000
Subject: RE: [PHP-DB] CSS versus Includes
Groups: php.db 
Request: Send a blank email to php-db+get-8112@lists.php.net to get a copy of this message
Matt, I recommend using separate style sheets. This is especially important when your users are browsing a record set, say 10 records at a time. There is no need to pass them the style sheet embedded in the PHP page for every page view. If the stylesheet is a file on the file system, it is more efficient for the server to serve that than parse a PHP page. In addition, most CSS files are not dynamic (some are). Since they are not dynamic in most cases they may as well be cached by the browser. If style is embedded in the PHP page and you have no-cache headers in your PHP then you will be passing this redundant data over and over again to the browser. If it is a separate flat file on the file system, it will have a real mod date and the web server and browser can determine when a fresh copy is needed. My 2 cents. Dan Matt wrote... > When I asked the question, what I meant was should I use the includes to > hold page style details or a CSS file. And someone who understood that this > was not an apples and oranges situation but one of approach answered that > Netscape was not fully supportive of CSS and suggested includes may be the > way to go.

« previous php.db (#8112) next »