[wp-hackers] Re: Plugins & CSS, embeded vs linking

Stephen Rider wp-hackers at striderweb.com
Tue Jul 15 17:27:51 GMT 2008


> On Jul 14, 9:27 pm, Stephen Rider <wp-hack... at striderweb.com> wrote:
>> On Jul 14, 2008, at 12:29 PM, Jonathan Dingman wrote:
>>
>>> Time after time, I get more annoyed with plugins forcing me to embed
>>> CSS.
>>> There ought to be a way to easily offer an option to link to a
>>> stylesheet
>>> rather than forcing me to embed the CSS.
>>> Even offering an option to "disable embedded CSS"... would be  
>>> fine.  but it seems like every plugin that uses CSS
>>> forces uses to embed CSS, or nearly every plugin.
>>>
>> CSS files go into cache -- is it really such a problem in that
>> regard?  just askin'.
>>
>> My Pull-quotes plugin has an option to "not link CSS".  It is quite
>> simple to add such an option -- add the settings, and then wrap the
>> CSS hook in an if( $setting ).  I actually did it at the request of a
>> user.  Took me five minutes.
>>
>> I think this is a matter of education more than throwing out more  
>> hooks.
>>
>> I may just feel another article coming on.... ;-)
On Jul 15, 2008, at 11:32 AM, Jonathan Dingman wrote:

> whether we move to some sort of built-in caching system or just some
> integrated CSS-single file function would be great.  something to
> centralize everything and make it perform better.

I think browser caching is better than server caching in this case.   
If the CSS is dynamically generated at the server, it is "new" every  
time -- or at less more frequently, as it changes from page to page.

Again, if the plugin already has an admin page, it is _very_ easy to  
add "don't link CSS" as an option.  I think plugin author education is  
the key here.

Stephen


More information about the wp-hackers mailing list