HighDots Forums  

cleaning up the css

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss cleaning up the css in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Bicycling Guitarist
 
Posts: n/a

Default cleaning up the css - 02-03-2008 , 12:16 AM






Yay. I ran a web site optimization test, and it informed me that even on
pages that didn't need them, the background images for other pages that are
on the style sheet are included as part of the file size being downloaded.

I did not know that. Amazing (that I am willing to admit I didn't know that
until tonight. Doh)! I took some of the style rules for background pages
that usually only applied to three pages each and moved those styles to the
heads of those pages. I reduced the file size of the html file being tested
by 13K (from 35K to 22K) and reduced the size of the stylesheet itself from
11.4 K to 10.4 K.

I'm sure I can clean up the style sheet a lot more if I look at it again,
especially with help (hint hint). The existing style sheet at
http://www.TheBicyclingGuitarist.net/css/style.css was at one time NINE
separate stylesheets that I then cobbled all together back in 2002 or 2003
(with lots of help from this newsgroup).

Thanks y'all.




Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: cleaning up the css - 02-03-2008 , 03:12 AM






The Bicycling Guitarist wrote:

Quote:
Yay. I ran a web site optimization test, and it informed me that even on
pages that didn't need them, the background images for other pages that
are on the style sheet are included as part of the file size being
downloaded.
That depends on the browser, at least some do not download background images
until they find an element that the rule applies to. This has resorted in a
number of tricks being used to preload images for rollovers (sprites being
one of the more popular).

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/


Reply With Quote
  #3  
Old   
Steve Pugh
 
Posts: n/a

Default Re: cleaning up the css - 02-03-2008 , 01:53 PM



On Feb 3, 6:16*am, "The Bicycling Guitarist"
<Ch... (AT) TheBicyclingGuitarist (DOT) net> wrote:
Quote:
Yay. I ran a web site optimization test, and it informed me that even on
pages that didn't need them, the background images for other pages that are
on the style sheet are included as part of the file size being downloaded.
The only browser I ever noticed doing that was Mac IE (can't remember
which version(s)). I was working on a site with several big background
images and noticed that Macs were very slow to load the first page.

I don't believe that any commonly used modern browser does this.

Easy to test: add a reference to an image in a selector that will
never actually get used. Then check your server logs to see of that
image ever gets downloaded.

Steve


Reply With Quote
  #4  
Old   
The Bicycling Guitarist
 
Posts: n/a

Default Re: cleaning up the css - 02-03-2008 , 04:46 PM




"The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net> wrote

Quote:
Yay. I ran a web site optimization test, and it informed me that even on
My web site is going to grow up. I am leaving Windows IIS to go to Unix
hosting. I am leaving Microsoft FrontPage that I have used to manage my web
site many years since I've hand coded all the HTML in Notepad to avoid the
proprietary and invalid code FP generates. I am almost certainly quitting
membership in over a hundred webrings since the WebRing management recently
expressed arrogant disdain and contempt for w3c standards. It's going to be
a brand new day.

um, still grateful for any help on improving the code such as it is. Thanks
www.TheBicyclingGuitarist.net/




Reply With Quote
  #5  
Old   
Ed Mullen
 
Posts: n/a

Default Re: cleaning up the css - 02-03-2008 , 07:53 PM



The Bicycling Guitarist wrote:
Quote:
"The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net> wrote in message
news:47a55c3a$0$3327$6e1ede2f (AT) read (DOT) cnntp.org...
Yay. I ran a web site optimization test, and it informed me that even on

My web site is going to grow up. I am leaving Windows IIS to go to Unix
hosting. I am leaving Microsoft FrontPage that I have used to manage my web
site many years since I've hand coded all the HTML in Notepad to avoid the
proprietary and invalid code FP generates. I am almost certainly quitting
membership in over a hundred webrings since the WebRing management recently
expressed arrogant disdain and contempt for w3c standards. It's going to be
a brand new day.

um, still grateful for any help on improving the code such as it is. Thanks
www.TheBicyclingGuitarist.net/
It is always with trepidation that we embrace newness.

Oh, hell. No sugar coating. It's a Brave New World. Good luck!


--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Why do we drive on parkways and park on driveways?


Reply With Quote
  #6  
Old   
Jeff
 
Posts: n/a

Default Re: cleaning up the css - 02-05-2008 , 04:02 PM



Ed Mullen wrote:
Quote:
The Bicycling Guitarist wrote:
"The Bicycling Guitarist" <Chris (AT) TheBicyclingGuitarist (DOT) net> wrote in
message news:47a55c3a$0$3327$6e1ede2f (AT) read (DOT) cnntp.org...
Yay. I ran a web site optimization test, and it informed me that even on

My web site is going to grow up. I am leaving Windows IIS to go to
Unix hosting. I am leaving Microsoft FrontPage that I have used to
manage my web site many years since I've hand coded all the HTML in
Notepad to avoid the proprietary and invalid code FP generates. I am
almost certainly quitting membership in over a hundred webrings since
the WebRing management recently expressed arrogant disdain and
contempt for w3c standards. It's going to be a brand new day.

um, still grateful for any help on improving the code such as it is.
Thanks
www.TheBicyclingGuitarist.net/

It is always with trepidation that we embrace newness.
I've embraced newness before. But it got old after a while. Such is
the nature of the web.

Jeff
Quote:
Oh, hell. No sugar coating. It's a Brave New World. Good luck!



Reply With Quote
  #7  
Old   
Andy Dingley
 
Posts: n/a

Default Re: cleaning up the css - 02-07-2008 , 04:58 AM



On 3 Feb, 06:16, "The Bicycling Guitarist"
<Ch... (AT) TheBicyclingGuitarist (DOT) net> wrote:
Quote:
Yay. I ran a web site optimization test, and it informed me that even on
pages that didn't need them, the background images for other pages that are
on the style sheet are included as part of the file size being downloaded.
So what?

They'll be wanted pretty soon, when users nav to other pages. If they
only bother to read one page, screw them 8-)

Slowness in downloading them isn't an issue, other than possible
slowdown to the rest of your page. It doesn't matter if they haven't
loaded immediately, you couldn't see them anyway.

Think of it as "image pre-loading" instead. Back in the '90s, people
used to embed chunks of JavaScript on each page to achieve this!

Caching (between client and server) will take care of the rest. Let
the network layer worry about it.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.