Use more CSS

CyberSkull

CAGiversary!
I've noticed that CAG isn't using enough CSS in it's page layout.

Let's take a simple example of the platform icons. They don't specify the height or width which causes the layout engine of the browser to recalculate the page layout every time a new image is loaded. Adding a css class with associated dimensions will allow the page to be laid out before the image loads, speeding up page load time for the end user.

This is the current code for the NES icon used in the game listing table.
HTML:
[IMG]http://www.cheapassgamer.com/forums/images/misc/gameicons/nes.gif[/IMG]

It should be changed to:
HTML:
[IMG]http://www.cheapassgamer.com/forums/images/misc/gameicons/nes.gif[/IMG]

And in the site's stylesheet there should be an entry:
Code:
img.platform {
	height: 15px;
	width: 15px;
	border: 0;
}

This is just one example of what can help the site. Ideally all reused images should have an associated class in the stylesheet, but that's not always possible/practical. Moving towards that is always a good thing though.

:)
 
There are a bunch of optimizations to be made, but right now our priority is to push out new features. For example, check out the avatars on the home page... if you're after optimizations for page loading speeds, look at those. We've committed the cardinal sin of resizing in the browser. All because the hassle of changing vBulletin to create an additional downsized version of a saved avatar (which would in turn make upgrades to the core software a huge pain in the arse) is time I'd rather spend working on new site features.

That's not to say this stuff is getting ignored, but it's not something that's likely to change before the next major version of the site. The next major overhaul will perfect all of these little issues. (We probably won't be on vBulletin anymore, for a start.)
 
If I had a new computer, I wouldn't be posting these tips as much. ;)

The older your computer gets the layout recalculations and redraws have a bigger impact.
 
[quote name='CyberSkull']If I had a new computer, I wouldn't be posting these tips as much. ;)

The older your computer gets the layout recalculations and redraws have a bigger impact.[/QUOTE]

That's all well and good, but my point is that these issues aren't there because we're oblivious to them - they're just not a top priority for us. With the next major site refresh, you'll have nothing to complain about.
 
[quote name='John']That's all well and good, but my point is that these issues aren't there because we're oblivious to them - they're just not a top priority for us. With the next major site refresh, you'll have nothing to complain about.[/QUOTE]

There is always something for people to complain about. Free or not, people will complain...
 
bread's done
Back
Top