another reason i can think of: sometimes, you don't want to include jquery plugin in the <head />, since maybe header.template is shared, then you put the include plugin codes into the templates only want to show the effect, this came to a problem...putting css into body failed the html validation.
On 9月13日, 下午6時55分, Christof Donat <[EMAIL PROTECTED]> wrote: > Hi, > > > > > > > More & more plugins are using CSS to style the layout, this is good, > > but their didn't aware of if user browser don't know javascript, it is > > useless to load the CSS, e.g. thickbox > > > <script type="text/javascript" src="path-to-file/thickbox.js"></ > > script> > > <link rel="stylesheet" href="path-to-file/thickbox.css" type="text/ > > css" media="screen" /> > > > can be better: > > > <script type="text/javascript" src="path-to-file/thickbox.js"></ > > script> > > <script> > > document.write('<link rel="stylesheet" href="path-to-file/ > > thickbox.css" type="text/css" media="screen" />'); > > </script> > > Most userse do have JS active. The overall overhead in bytes downloaded for > thickbox.css where it is not needed is smaller than the overhead of bytes you > introduce with your additional script tag for all users. In most cases it is > better to load the unused stylesheet. > > Christof- 隱藏被引用文字 - > > - 顯示被引用文字 -