lynx /dev/fd/0 > fileHmm, it works on Linux. )
I don't intend w3m to be a substitute of any other browsers, including Netscape and Lynx. Why did I wrote w3m? Because I felt inconvenient with conventional browsers to `take a look' at web pages. I am browsing web pages in LAN environment. When I want to take a glance at a web page, I don't want to wait to start up Netscape. Lynx also takes a few seconds to start up (you can get lynx startup time to almost zero when you rm /etc/mailcap). On the other hand, w3m starts immediately with little load to the host machine. After looking at the information using w3m, I use other browser if I want to read the the page in detail. As for me, however, w3m is enough to read most of web pages.
w3m was derived from a pager named `fm'. Fm was written before 1991 (I don't remember the exact date) when WWW was not popular. At that time, the word `browser' meant a file browser like `more' or `less'.
I wrote fm to debug a program for my research. To trace the status of the program, it dumped megabytes of values of variables into a file, and I debugged it by checking the dumped file. The program dumped information at a certain time in one line, which made the dumped line several hundred characters long. When I looked the file using `more' or `less', one line was folded into several lines and it was very hard to read it. Therefore, I wrote fm, which didn't fold a line. Fm displayed one logical line as one physical line. When seeing the hidden part of a line, fm shifted entire screen. As I used 80x24 terminal at that time, fm was very useful for the debugging.
Several years later, I got to know WWW and began to use it. I used XMosaic and Chimera. I liked Chimera because it was light. As I was interested in the mechanism of WWW, I learned HTML and HTTP, and I felt it simpler than I expected. The earlier version of HTTP was very similar to Gopher protocol. HTML 2.0 was simple enough to render. All I have to do seemed to be line folding and itemized display. Then I made a little modification to fm and made a web browser. It was the first version of w3m. The name `w3m' was an abbreviation of Japanese phrase `WWW wo miru', which means `see WWW'. It was an inheritance from `fm', which was an abbreviation of `File wo miru'. The first version of w3m was released at the beginning of 1995.
I had used w3m as a pager to read files, E-mails and online manuals. It was a substitute of less. Sometimes I used w3m as a web browser, but there were many pages w3m couldn't display correctly, most of which used table for page layout. Once I tried to implement table renderer, but I gave up because it seemed to be too difficult for me.
It was 1998 when I tried to modify w3m again. There were two reasons. The first is that I had some time to do it. I stayed Boston University as a visiting researcher at that time. The second reason is that I wanted to use table in my personal web page. I had written research log using HTML, and I wanted to write a table in it. At first I used <pre>..</pre> to describe table, but it was not cool at all. One day I used <table> tag, which made me to use Netscape to read the research log. Then I decided to implement a table renderer into w3m.
I didn't intend to write a perfect table renderer because tables I used was not very complicated. However, incomplete table rendering made the display of table-layout pages horrible. I realized that it required almost-perfect table renderer to do well both in `rendering (real) table' and `fine display of table-layout page.' It was a thorn path.
After taking several months, I finished `fair' table renderer. Then I implemented form into w3m. Finally, w3m was reborn as a practical web browser.
The algorithm above assumes that the screen width is known. But it is not true for nested table. According the algorithm above, the column width of the outer table have to be known to render the inner table, while the total width of the inner table have to be known to determine the column width of the outer table. If WIDTH attribute exists there are no problems. Otherwise, w3m assumes that the inner table is 0.8 times as wide as the outer table. It works fine, but if there are two tables side by side in an outer table, the width of the outer table always exceeds the screen width. To render this kind of table correctly, one have to render the table once, check the width of outmost table, and then render the entire table again. Netscape might employ this kind of algorithm.
# Boehm GC library is no longer included into w3m packages # after w3m-0.4.2.
W3m doesn't use libwww.
Boehm GC is a garbage collector for C and C++. I began to use this library when I implemented table, and it was great. I couldn't implement table and form without this library.
Older version than beta-990304 used LIBFTP because I felt tired of writing codes to handle FTP protocol. But I rewrote the FTP code by myself to make w3m completely free. It made w3m slightly smaller.
By the way, w3m doesn't use UNIX standard regexp library and curses library. It is because I want to use Japanese. When I wrote fm, there were no free regexp/curses libraries that can treat Japanese. Now both libraries are available and they looks faster than w3m code.