Skip to content

Posts tagged ‘CSS3’

25
Feb

Web Page Optimization – Changes I Made for Page Loading Speed

It has been years since I optimized the page loading speed at GoToQuiz. At that time, image sprites and CSS/javascript minification were the state of the art. In the intervening years, though, further progress has been made. Of particular note is the “retirement” of older versions of Internet Explorer, and the emergence of CSS3 and HTML5, which allows developers the ability to further streamline their sites. So as I am in the process of revamping the UI, I’m taking advantage of the latest techniques to boost page loading speed. Be aware, this is nothing revolutionary–this blog post is simply an overview of which changes I’m making, and why.

Migrating pages over to HTML5 allows the markup to be more semantic while taking fewer bytes–a double win.  Using tags such as nav, section and article helps alleviate so-called “div-itis”, allowing cleaner markup and a smaller overall filesize.  HTML5 also follows the maxim of “convention over configuration”, letting you eliminate unnecessary attributes like type=”text/javascript” on script tags, for example.

The adoption of CSS3 has provided many possibilities for creating beautiful visual effects without using image files.  Here is an example: on an early iteration of the design of the various headings on GoToQuiz, I used this sprite combined with CSS to create the rounded color bar appearance.

Read moreRead more

10
Oct

CSS3 Styled Progress Bar

The quiz results on GoToQuiz are, more or less, progress bars.  They visually depict your quiz result as it falls between 0% and 100%, inclusive.  How would one go about creating an attractive progress bar entirely in CSS3?  I’ll quickly show how I did it.

First, this is what the old bars look like:

Simple red progress bar

It’s a <div> inside a <div> with some simple styling.  The inner <div> is set to a reddish background and given a width as a percentage–80%, in the example above.  This is a simple bar that communicates what it needs to, whether as a quiz result, poll result, or progress bar, but it’s not visually appealing.  In contrast, this is what the new bar looks like:

beautiful CSS3 progress bar

This is done without any images, which would require additional requests to the server and are best-avoided when CSS is up to the job.  And it works in all modern browsers (although IE < 10 will not stripe the unfilled portion of the bar).

First, here is the HTML for the progress bar: Read moreRead more