URL extraction is at the core of link checkers, search engine spiders, and a variety of web page analysis tools. While
<img> elements are primary sources of URLs, there are more than 70 element attributes with URLs in HTML, XHTML, WML, and assorted HTML extensions. This tip shows how to extract URLs from all of these.
Though HTML is usually the focus for extracting URLs for a link checker or analysis tool, CSS files also include URLs. The CSS
@import rule uses a URL to include another CSS file, and many style properties include a URL to load an image or other content. This tip shows how to scan a CSS file and extract its URLs.
Zebra stripes in a graphical user interface (GUI) are subtle background stripes painted behind the rows of a hierarchical list, or tree. They improve the readability of wide tree rows, but the
JTree class in Java's Swing doesn't support them. This tip shows how to extend
JTree to add zebra background stripes.
Table zebra stripes are alternating subtle background stripes painted behind the table's rows in a graphical user interface (GUI). They improve the readability of long rows in wide tables, but the
JTable class in Java's Swing doesn't support them. This tip shows how to extend
JTable to add zebra background stripes.
Zebra stripes are subtle alternating stripes painted behind list items in a graphical user interface (GUI). They improve the readability of wide and long lists, but the
JList class in Java's Swing doesn't support them. This tip shows how to extend
JList to add zebra background stripes.
CSS defines only three bullet shapes: disc, circle, and square. To get custom bullets, web designers use small bullet images. The network latency cost for these images is high, slowing down the web site. Instead, avoid bullet images and use Unicode symbol characters as bullets. Unicode bullets require nothing extra to download and provide thousands of bullet shapes to choose from.
A typical web page bar chart uses an image from a presentation or spreadsheet application. The network latency cost for the image is high, slowing down the web site. Instead, create bars using rows of Unicode block characters: █. The characters are much faster to download and they scale well as the font size is changed.
A typical web page color gradient uses a thin GIF or PNG image repeated for the width of the page. However, the network latency cost for the image is high, slowing down the site. Instead, skip the image and draw the gradient with a table and thin rows of varying background colors. The table is much faster to download and looks the same.
Numbers in prices, quantities, dates, times, phone numbers, and addresses may not be of interest when processing a web page for a PHP search engine or keyword analysis tool. In international text there are around 900 different types of digits, currency symbols, and units of measure marks that need to be removed. This tip shows how to remove numbers and number-related characters.