CMS Made Simple Forums
https://forum.cmsmadesimple.org/

Feature request: add user agent info to cached stylesheet
https://forum.cmsmadesimple.org/viewtopic.php?f=75&t=57137
Page 1 of 1

Author:  hoshy [ Thu Oct 06, 2011 10:41 am ]
Post subject:  Feature request: add user agent info to cached stylesheet

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)

Author:  calguy1000 [ Thu Oct 06, 2011 2:50 pm ]
Post subject:  Re: Feature request: add user agent info to cached styleshee

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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/