Skip to main content
main-content

Über dieses Buch

Although web standards-based websites can scale effectively—and basic CSS will give you basic results—there are considerations and obstacles that high traffic websites must face to keep your development and hosting costs to a minimum. There are many tips and tricks, as well as down-to-earth best practice information, to make sure that everything runs quickly and efficiently with the minimum amount of fuss or developer intervention. Targeted at "high traffic" websites—those receiving over 10,000 unique visitors a day—Pro CSS for High Traffic Websites gives you inside information from the professionals on how to get the most out of your web development team.

The book covers the development processes required to smoothly set up an easy-to-maintain CSS framework across a large-volume website and to keep the code reusable and modular. It also looks at the business challenges of keeping branding consistent across a major website and sustaining performance at a premium level through traffic spikes and across all browsers. Defensive coding is considered for sites with third-party code or advertising requirements. It also covers keeping CSS accessible for all viewers, and examines some advanced dynamic CSS techniques.

Inhaltsverzeichnis

Frontmatter

Chapter 1. The Value of Process

Abstract
In this chapter, we aim to focus on how processes in your team and company can help rather than hinder your productivity. Many of these topics are not specific to CSS (Cascading Style Sheets), but to write CSS that is scalable and shared among many teams or websites it is vital to have solid processes and consistency. We willtalk about development methodologies, how to ensure consistent code styles, source control, tools, and naming conventions. Because we aim to give you useful practical examples, we will present an example process at the end of this book.
Antony Kennedy, Inayaili de León

Chapter 2. CSS Style Guide

Abstract
Every CSS author has his preferred way of writing code. For example, some people prefer to write each property and selector on a separate line, while others would rather have everything on one single line. Some authors never add a semicolon to the last property on a selector (because it isn’t necessary); others prefer to remove the space between the colon and the value of a property. The list goes on.
Antony Kennedy, Inayaili de León

Chapter 3. Fundamentals

Abstract
When working with CSS, there are fundamental concepts that the developers should be aware of and understand intimately, but that tend to be overlooked or even ignored. Knowing these concepts in depth will mean that the CSS created will be better planned, bugs will be easier to avoid, and style sheets will be, in general, simpler, cleaner, and easier to maintain.
Antony Kennedy, Inayaili de León

Chapter 4. Frameworks and Integration

Abstract
When working on high-traffic websites, we want to achieve the highest possible level of efficiency and maintainability. This, in terms of CSS, means our style sheets should be flexible, robust, and as small as possible.
Antony Kennedy, Inayaili de León

Chapter 5. Brand Implementation

Abstract
Everyone knows that, online, our competition is just one click away. The average user’s attention span is getting shorter quickly.1 It is easy then to come to the conclusion that even though the typical user of your website may be slightly more engaged, you should make sure that the website has an impact and that the brand experience is translated to the Web correctly.
Antony Kennedy, Inayaili de León

Chapter 6. CSS and Accessibility

Abstract
In essence, making a website accessible means ensuring that everyone can get to everything. It does not mean everyone has to have the same experience, but it does mean there should be no piece of functionality or content that is unreachable (or inaccessible) by anyone, regardless of their individual ability, devices, browsers, or environment.
Antony Kennedy, Inayaili de León

Chapter 7. Devices

Abstract
With high-traffic websites, unusual devices make up a much higher number of visitors than they would otherwise. Depending upon the demographics that your site is targeting, and the results of your reporting tools, you may need to consider these devices seriously. When we discuss devices from a CSS perspective, really we are just talking about browsers with different capabilities. Whether our CSS is being served to a mobile phone, a laptop, or a search engine spider, in essence it’s just another web browser, with a different resolution and different abilities to process our CSS.
Antony Kennedy, Inayaili de León

Chapter 8. Performance

Abstract
CSS files are (typically) small files with (typically) simple syntax. It might seem that where performance is concerned there is little to be done to make a difference, and that improvements will be slight. In many cases, this may be true. However, when we are dealing with CSS at a grander scale, where our files may be reaching larger sizes and we expect them to be served millions or tens of millions of times a day, small improvements make big differences—both to the user and the developer. One kilobyte may seem a tiny amount of data by today’s standards, but do the math—those kilobytes soon add up to gigabytes of data that the business needs to pay for in bandwidth. And when we are considering the payload the user downloads and the speed of the page rendering, it is a truism to say that every little bit counts.
Antony Kennedy, Inayaili de León

Chapter 9. Dynamic CSS

Abstract
Up until now, this book has considered CSS files to be static assets. That is, what is requested from the server and delivered to visitors of your site is exactly the same in every instance. Although this is almost always the expected behavior and most performant way to implement CSS, it is possible to tailor the output of our CSS dependent on other factors and deliver different CSS to different users.
Antony Kennedy, Inayaili de León

Chapter 10. Testing and Debugging

Abstract
So, you’ve got your website all set up and running, you’ve written your CSS, and everything worked exactly right the first time, right? Unlikely. With any type of scripting or programming there is a degree of trial and error involved in reaching your goals. This equally applies to CSS. When writing CSS, developers typically flick back and forth between the code and the browser (or browsers), writing or amending code, and refreshing to check the results. If there are any more complicated steps in between—building, uploading, compiling, and so on—the productivity of the developer is impacted with every edit.
Antony Kennedy, Inayaili de León

Chapter 11. Creating Your CSS

Abstract
In this chapter and the appendices, we put all previous chapters to practical use. We intend to take everything that you have learned throughout the book and give you real-life examples that you can modify for your own use. While we do not intend to dictate your processes and how you should build your own guidelines, we will provide you with templates you can use for discussions within your team to build your own. We will also go through the process of making a framework from start to finish that you can then adapt to the needs of your website.
Antony Kennedy, Inayaili de León

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise