In a web designer’s dream world, all browsers would behave in the same way. They would all render HTML predictably and offer identical support for web standards.
But we don’t live in a web designer’s dream world, and we can’t expect to, of course. It would be silly, for example, to expect a text-based browser like Lynx to be able to handle all the same features as a wizzy graphical browser like Opera.
As a result, it has become common practice for web sites to tailor the HTML they send to different browsers. This can be done in a variety of ways — basically any way that you can dynamically generate HTML — but whether you do it with an ASP page, a Java servlet, or even by configuring your server itself, there must be some way for a browser to identify itself to your server.
That’s where the User-Agent string comes in.
Continue Reading “Detect Which Browsers Are Visiting Your Site” »
In Lesson 1 of this tutorial, we learned how to manipulate images to reduce your download time. Now, it’s time to dig even deeper into the fine art of slimming down those pages.
We’re going to talk about page layout, and that means talking about HTML tables, first and foremost. First, because table-based layouts are the de facto web standard, and foremost because table-heavy designs have a nasty reputation for poor performance.
And CSS layout? It’s faster, better, and smarter. We’ll cover it later. Now, you’re welcome to skip ahead, but The House bets that you’ll keep reading.
CSS is cooler than tables. And smaller. And in the long run, its better. But some CSS-2 layout standards still aren’t showing up the same in every browser. So let’s face it — sometimes right-now compatability trumps future-compatability.
Tables aren’t all bad, anyways. Most designers are taught to design with a grid, so dropping things into a table comes naturally. We’re also fond of their duality; variable-width tables can both define a layout and respond to the unpredictable elements of a page. Being a web designer means coping with unpredictability, and striking a compromise between your design and the user’s flexibility. (Users should be afforded the ability to make fonts larger, for instance). Unfortunately, tables also increase the time it takes to display a web page, and sometimes by a substantial amount.
Continue Reading “Site Optimization Tutorial – Lesson 2″ »
In Build a Website With Flash and MySQL – Lesson 1, we successfully created a MySQL database, filled it with blog entries, and learned how to query it. Now we’re going to move on to the fun stuff:creating a Flash container to display our blog entries as we pull them out of the database. I’m going to help you build something along the lines of what you’ll encounter at my own Flash blog site, Luxagraf.
Fire up Flash and create a new document. The first thing we need is a nice big text field to display our entries. You could create a text field in ActionScript if you like, using the createTextField() method. I don’t know about you, but my stomach for code is still full from yesterday, so I’ve just drawn a text field using the cursor tool and given it an instance name of entries_txt. In the Properties Inspector, set the text to be dynamic, multi-line, and HTML formatted. For safety’s sake, select the character option and click “embed all characters.” Flash has some issues with dynamic textfields that don’t have embedded characters, especially if you put your text under a mask. Continue Reading “Build a Website With Flash and MySQL – Lesson 2″ »
Apparently, the pro-developer guiding principles of Macromedia continue to survive under the direction of Adobe. Ever since they acquired Macromedia, Adobe, the company that was previously all about PDFs and PSDs, has been releasing a healthy serving of web tools via Adobe Labs. The Adobe Labs site is quickly becoming a vital meeting place on the web where developers can share ideas and experiment with new technologies.
Adobe’s Flash-meets-Ajax framework lets developers create dynamic interfaces and UI elements. Now they’ve unveiled a preview release of their new Ajax framework, Spry.
In this article, I’ll walk you through making a very simple Spry application. I hesitate to even call it an application, because most of the heavy lifting is done in the framework itself. The code we’ll be writing will look an awful lot like HTML and CSS.
Continue Reading “Build Ajax Components With Spry” »
Way back when, in the wilds of 1995, there were a great many people who were disgruntled with the state of Web servers. The commercial ones, like Microsoft’s IIS (Internet Information Server) and Netscape’s family of servers, hadn’t been born yet, and the ones put out by college students – well, they sucked.
But lo! What did the early code jockeys do? They made their own damn Web server. They called it Apache (as in a patchy server, because it had a lot of patches). A patch is just what it sounds like – something to plug holes in your code with. This small group of hackers started a project that would eventually create the most popular Web server software in the world.
Not to give ourselves too much credit, but one of the founders of the Apache project was an engineer at HotWired. Don’t you just love us? If you really want to know more about Apache’s history, there’s a nice narrative on its site.
The brilliance of the Apache group’s scheme lay not just in the fine programming, but in the development model it used. Now it is fashionably called open source.
(A small side note:There are several different flavors of open-source development. Apache’s lets anyone create a commercial product based on its code and doesn’t make them share the results if they don’t want to. If I say this model is “better” than the other schemes, hostile email will no doubt follow this article’s publication. But it may well be.)
Continue Reading “Apache for Beginners” »