Page 1 of 1

Feature request: add user agent info to cached stylesheet

Posted: Thu Oct 06, 2011 10:41 am
by hoshy
If you use smarty in your stylesheets the stylesheet is processed only one time and cached. next request will return the processed cached styelsheet. so far so good. but if you use plugins where the result depends on the user agent (e.g. to use only styles for specific browsers) you will get always the same cached stylesheet.

One more detailed example: I use base64 encoded images in my stylesheets. I use a small plugin that only returns base64 data if the browser supports it or - if IE8 - the base64 data is smaller than 32 kb.
When i first visit that page with firefox the stylesheet is cached with base64 data. But when i visit the page the second time with IE8 or IE7 i will get the same stylesheet. IE7 will not display any images and IE 8 only if the base64 data is smaller than 32kb. If not, it will cut the image after 32kb.
So it would be nice if the stylesheet can be cached for each useragent separately. (as i can see you just need to add the $_SERVER['HTTP_USER_AGENT'] to the cached css filename)

Re: Feature request: add user agent info to cached styleshee

Posted: Thu Oct 06, 2011 2:50 pm
by calguy1000
Feature requests will not be entertained during a beta process. Please file your feature request in the proper location in the forge for future consideration.