Category: Browsers

[OT] Not sure if it’s open to discussion, but I don’t understand why all browsers don’t just display RSS (don’t get me wrong… NetNewswire is great, but sometimes I don’t want to launch another app… I just want to see an RSS feed).

Safari used to display RSS… and very nicely I might add… but stopped displaying RSS in any capacity as part of Mountain Lion.

Using every CSS declaration only once is an effective way to reduce file size of style sheets. Itâ€™s not a trivial optimization technique though: Watch over the cascade and adjust your editing workflow.

Optimizing your web illustrations, icons, and graphics is one of the simplest yet most effective ways to decrease your page load time. In this tutorial, we discuss image file formats and optimize some real Google graphics for faster download on the web.

Mozilla is leveraging an impressive new optimization technique to bring a big performance boost to the Firefox JavaScript engine. The code was merged today (but is not yet ready to be enabled by default in the nightly builds) and is planned for inclusion in Firefox 3.1, the next incremental update of the open-source web browser.Â Â Â

This selector uses a “>” symbol as a “combinator” that is placed between two parts of a CSS selector, and indicates that the target of the rule is the element on the right side of the “>” combinator, but only when that element is a direct child of the element to the left of the combinator. Thus, the selector table>td can never target any element, because TD’s are never direct children of tables, only of TR’s. On the other hand, the selector tr>td would select every TD on the page, since all TD’s are direct children of TR’s.

The main difference between the Child combinator and the familiar space combinator is that the space combinator is a “descendant” combinator, meaning that the element to the right of the space only needs to be between the tags of the element on the left to be selected. So with the selector tableÂ td, all TD’s will selected, since TD’s always fall between the tag pair of one table or another.

The Child combinator is quite useful for targeting rules to direct children of an element, without also targeting the more deeply nested descendants as well. Unfortunately, up until IE7 there was no point in using it for its intended purpose, since so few of the viewing public would get the benefits of the styling.

This selector is a “+” combinator symbol placed between parts of a selector, and is very similar to the Child combinator. The only difference between the two is that while the Child combinator points to direct children of an element, the Adjacent Sibling combinator points to an element which directly follows another element in the source.

Thus the selector tr+td cannot select anything, because no TD ever directly follows a TR. Instead, TD’s are contained inside TR’s, and that is not considered to be “following” the TR. However, the selector tr+tr would select any TR that directly followed another TR, which means that every TR within a table would be selected except for the very first TR in that table.

Get it? An adjacent sibling element not only follows its previous sibling, but is also completely separate from it. Further, if two DIV’s are in sequence and each contains a paragraph, those two paragraphs are not considered siblings, because they reside in different parent elements. The fact that one follows another means nothing unless the following sibling starts at the same point where the previous sibling ends.

Star HTML

Oh, you want to know about that structural thing? Well, the hack that uses it is called the star-html hack, and it works by taking advantage of an oddity in Explorer’s treatment of the DocumentÂ ObjectÂ Model, or DOM for short. Simply stated, all web pages start with a root element called html, which then contains two children, the head and the body elements. Those two then contain other children, and so forth.

Most browsers obey this arrangement, but Explorer for both Win and Mac do not. They seem to think there is a mysterious element enclosing the html element! It’s pretty strange, but in fact this extra outer “root” element has no apparent ill effects on web pages, and remained unnoticed for years, until EdwardsonÂ Tan began experimenting with CSS selectors. He found that a selector written as *Â htmlÂ Â .targetelement would apply the styles to .targetelement, but only for the IE browsers.

Think about it. That star is the “universal” selector, so it points to any element, but it comes beforehtml. Therefore, the full selector in effect says: “Select .targetelement when it is contained within html, and when html is contained within any other element”.