|
Comments for: tim20000821
| Message # 1015060: |
|
Date: 01/09/03 04:00
By: Scott Davey Subject: Server-side css generation is not a good idea Hi, Server-side generation of css files is not a good idea. Here's some direct experience to explain why... Last year my company built a site with dynamic CSS files that did browser detection and customised the style sheet appropriately, similarly to the way this article describes it. Following the launch, the site developed an intermittent problem for some users where the fonts would sometimes appear smaller, but refreshing would fix it. This occurred in different sites, but one site in particular had it bad. We could not reproduce it at our office, which made matters worse. After a few months, we ended up working out what was going on. When a Netscape 4 browser viewed the site, it would request the HTML file and the CSS file, which of course would be customised to NS4. When a user in the same netork using IE4 requested a page from the site, it would also request these files. However, their proxy server was transparently proxying all files, and had already cached this file. The fil was subsequently delivered to the IE user in netscape format. The IE user would then hit 'refresh' which would cause the proxy server to get the IE version - of course the Netscape user would then get big fonts next time they visited the site :( Even setting header directives to not cache the file did not seem to fix it - the proxy server was too arragant and cached it anyway. Our solution was to create different css fils for different browsers - style_ie.css, style_ns.css, etc. We then set the HTML page to reference the appropriate css page. This solution solved our problems. Their proxy server was Squid, which is one of the most popular proxies on the internet. It was part of a commercial firewall product. Our solution also had the side effect of speeding up page loads and rendering, as the css file doesn't have to be built each time. I hope this helps others battling the browser style wars.... Scott |
Previous Message | Next Message |
| Comments: | ||
| RE: javascript:history.back() | Mike | 01/13/06 08:45 |
| RE: javascript:history.back() | Srinivasan | 11/18/04 03:21 |
| RE: javascript:history.back() | Alex Livingstone | 04/17/04 00:21 |
| updating for netscape 4+/7 | abbey | 01/30/03 14:27 |
| RE: Browser detection and CSS | Bradley Jareczek | 01/15/03 21:04 |
| alternative for browser detection | Bradley Jareczek | 01/15/03 21:02 |
| Server-side css generation is not a good idea | Scott Davey | 01/09/03 04:00 |
| Getting the code in Tim's article to work | Norman Graham | 12/16/02 07:01 |
| RE: How get the client screen size? | Christian | 12/03/02 02:39 |
| css doesn't need php to detect the browser | Kristof Neirynck | 11/06/02 03:57 |
| RE: Sniffer code | Hirvi | 10/14/02 19:45 |
| PHP & CSS - A Step Further | John Krische | 09/17/02 23:56 |
| Browser detection and CSS | Praggers | 08/09/02 06:09 |
| RE: The (in)famous CSS trick | Chris Berry | 06/09/02 10:14 |
| RE: how to implement this? | ars | 06/06/02 16:28 |
| php CSS Generator | Harry Fuecks | 05/08/02 12:14 |
| RE: simpler: generating external CSS with php. | ShellyMac | 03/19/02 14:44 |
| how to implement this? | Kassim Kasmani | 03/05/02 16:33 |
| Browser detection CSS IE6 | Michael Hitchcock | 02/07/02 14:14 |
| Has anyone actually gotten this to work? | Brett | 02/04/02 17:23 |
| Wish this would actually work | Brett Farrey | 01/16/02 12:34 |
| how can I create a .css file and a linkage? | louis | 01/10/02 22:03 |
| Browser detection for Opera | Harry Oosterveen | 01/09/02 06:07 |
| RE: The (in)famous CSS trick | Chance Warner | 01/07/02 19:17 |
| RE: The (in)famous CSS trick | Jonas aka Hemlige Arne | 11/09/01 05:10 |
| Browserswitch | pippphilipp | 10/01/01 13:30 |
| Implementation | ruusvuu | 10/01/01 09:47 |
| RE: Sniffer code | Mark | 09/28/01 08:26 |
| Sniffer code | Loki | 09/12/01 03:39 |
| RE: Form fields | kutte | 09/11/01 02:01 |
| RE: My own PHP browser detection | Toma | 08/30/01 08:39 |
| CSS Position | Thomas | 08/17/01 11:33 |
| RE: Netscape and style-classes | Joel Sanda | 08/03/01 22:57 |
| How to check about bit-encription of browser? | prinya | 07/26/01 20:27 |
| How to check bit encription of browser? | Pim | 07/26/01 20:10 |
| RE: Netscape and style-classes | alex | 07/19/01 05:02 |
| Netscape and linked CSS's the answer!! | noboby important | 07/10/01 06:48 |
| Help Please | Anthony P Bikowski | 07/08/01 13:55 |
| What is formal specification Techniques | Pujari Pandit | 07/06/01 07:19 |
| xx-small and TEXTAREA | Henrik Erlandsson | 07/04/01 09:18 |
| Netscape and style-classes | Erx | 06/24/01 12:57 |
| RE: Can Anyone Know how to do this? | Just Some Guy | 06/23/01 20:46 |
| RE: simpler: generating external CSS with php. | Eric Blade | 05/30/01 00:20 |
| Can Anyone Know how to do this? | GamerZ | 05/28/01 00:13 |
| RE: Forget all that code *sheesh* do this | Dan | 05/25/01 00:55 |
| RE: simpler: generating external CSS with php. | Servo | 05/23/01 13:22 |
| RE: Use pixels in CSS | Servo | 05/23/01 13:05 |
| RE: Forget all that code *sheesh* do this | Servo | 05/23/01 12:52 |
| RE: Forget all that code *sheesh* do this | tenacious | 04/20/01 02:21 |
| Opening new window | C. Dick | 04/13/01 17:51 |
| Neater way for the final step | Dave | 04/10/01 05:17 |
| RE: Mozilla? | FlyHigh | 04/02/01 14:01 |
| RE: simpler: generating external CSS with php. | FlyHigh | 04/02/01 13:55 |
| RE: Mozilla? | Eric Blade | 03/26/01 13:14 |
| RE: simpler: generating external CSS with php. | Eric Blade | 03/26/01 13:08 |
| simpler: generating external CSS with php. | Ben Hardy | 03/12/01 14:52 |
| Forget all that code *sheesh* do this | Mike Webby | 03/11/01 18:21 |
| yikes, my bad (was: other options) | adam | 02/17/01 19:50 |
| RE: How get the client screen size? | Colin Bell | 02/03/01 07:39 |
| How to position multiple layers? | aumbrother | 01/27/01 16:21 |
| other options... | adam | 01/21/01 07:28 |
| RE: Using it to link external style sheets | Michael Svazas | 01/19/01 20:22 |
| The (in)famous CSS trick | Simen Brekken | 01/11/01 04:55 |
| RE: Won't work, no matter what | Donny | 01/09/01 18:32 |
| RE: How get the client screen size? | Liam DelaHunty | 01/06/01 16:48 |
| How get the client screen size? | Farrukh Shahzad | 12/26/00 09:45 |
| RE: My own PHP browser detection | Rick Allen | 12/06/00 16:56 |
| Won't work, no matter what | Rick Allen | 12/05/00 17:17 |
| RE: Using it to link external style sheets | Andrew | 11/27/00 21:56 |
| PHPClientSniffer | Roger Raymond | 11/03/00 16:03 |
| RE: Mozilla? | Joseph M. Ferris | 10/24/00 18:33 |
| RE: My own PHP browser detection | Neil P Davis | 10/19/00 08:44 |
| RE: version returs 0 and agent returns OTHER | Neil P Davis | 10/19/00 08:40 |
| RE: Browsers so poorly with CSS | Neil P Davis | 10/18/00 15:47 |
| RE: Code breaks on resizing window in Netscape | Sean Wilson | 10/15/00 19:37 |
| javascript:history.back() | Philip | 10/09/00 01:20 |
| Code breaks on resizing window in Netscape | Jeanie MacWilliam | 10/04/00 16:27 |
| RE: Browsers so poorly with CSS | Kyle Donaldson | 09/27/00 11:23 |
| RE: version returs 0 and agent returns OTHER | Kyle Donaldson | 09/26/00 19:31 |
| YABC- yet another browser checker :) | dbrossa | 09/11/00 16:12 |
| RE: Why css_site()? | philip olson | 09/11/00 12:00 |
| Why css_site()? | Anders Mejner | 09/09/00 14:49 |
| Windows Browsers | James | 08/30/00 16:01 |
| version returs 0 and agent returns OTHER | Danny Appaiah.M.M | 08/30/00 02:01 |
| My own PHP browser detection | Alex Lee | 08/30/00 00:42 |
| RE: Mozilla? | Alex Lee | 08/30/00 00:37 |
| Use pixels in CSS | Vladimir Rüntü | 08/29/00 05:13 |
| RE: Using it to link external style sheets | Jeremy Rempel | 08/27/00 21:49 |
| RE: Form fields | DELCAMPE Sébastien | 08/27/00 03:26 |
| Using it to link external style sheets | Evert Smit | 08/25/00 04:26 |
| RE: Awesome | Brett Stimmerman | 08/25/00 01:20 |
| RE: Awesome | Amaury Jacquot | 08/24/00 23:55 |
| RE: Mozilla? | Richard Heyes | 08/24/00 15:10 |
| mozilla vs. netscape rendering | Todd Hammer | 08/24/00 13:54 |
| RE: Need Assistance | Wolfgang Drews | 08/24/00 08:58 |
| RE: Form fields | Peter Huestis | 08/24/00 07:31 |
| Form fields | DELCAMPE Sébastien | 08/24/00 02:12 |
| RE: Mozilla? | philip olson | 08/23/00 20:28 |
| Mozilla? | Neil Moomey | 08/23/00 20:10 |
| RE: Browsers so poorly with CSS | Peter Huestis | 08/23/00 17:57 |
| Browsers so poorly with CSS | Ryan McGeary | 08/23/00 17:05 |
| RE: Awesome | jim | 08/23/00 04:42 |
| Need Assistance | Chris Carroll | 08/23/00 02:18 |
| RE: Awesome | Richard Heyes | 08/22/00 13:53 |
| Awesome | Brett Stimmerman | 08/22/00 02:40 |
| RE: Why not get_browser() ? | Peter Huestis | 08/21/00 12:50 |
| get_browser.. | Chad Day | 08/21/00 10:49 |
| RE: Why not get_browser() ? | Tim Perdue, PHPBuilder.com | 08/21/00 10:34 |
| Why not get_browser() ? | Jens-Petter Salvesen | 08/21/00 10:18 |
| Getting this Implemented Now... | Peter Huestis | 08/21/00 09:13 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


