BASIC-DOS

A PCjs Retro-Programming Project

Project maintained by jeffpar

BASIC-DOS Manual

WEB

WEB [/D:date] [[http://]host[:port][/path]]

Browses the web, as it is on the BASIC-DOS network: WEB gets the page at an address, the same way FETCH does, and displays it as text, a screen at a time. The first line is the page’s address (and for a page from the Internet Archive, the date it was captured), and the rest is the page’s text, wrapped to fit the screen: headings and paragraphs are separated by blank lines, list items start with *, a horizontal rule is a line of dashes, preformatted text keeps its spacing, an image is its alternate text in brackets (eg, [Yahoo!]), and each link has a number in brackets before its text (eg, [12]News). Scripts, styles, and comments aren’t displayed.

A prompt on the last row shows the last line displayed and the number of lines, and waits for a command:

  • ENTER displays the next screen
  • - displays the previous screen
  • A link’s number goes to that page (unless it isn’t a web page, eg, a mailto: link)
  • Any other text is an address, which goes to that page
  • B goes back to the page before (up to 19 pages back)
  • Q quits

With no address, WEB starts at the prompt. If a page can’t be displayed, its error is displayed with the prompt, and the current page stays. If WEB’s output isn’t to a console (eg, WEB basicdos.com > PAGE.TXT), it displays the whole page, followed by a numbered list of its links (with their full addresses), and ends.

The Web as It Was

The network’s gateway (see FETCH) serves its own host names (basicdos.com and www.basicdos.com) from its own pages, but any other host name is found, too, and the gateway answers a request for one of its pages with the Internet Archive’s capture of that page (the page as it was captured, without the Archive’s own links): the capture nearest the date that WEB asks for with /D:date (year, month, and day, eg, /D:1996-12-01, or just year and month, or just a year), or without one, the gateway’s own date, which is 1998 unless the gateway was given another. For example:

WEB /D:1996-12-01 www.microsoft.com

displays Microsoft’s home page as it was in October 1996. Links go to pages from the same date (eg, relative links go to the same host), and pages from other hosts work the same way, as long as the Archive has a capture of them; one that it doesn’t have is Unable to find address. The date is sent to the gateway in an Accept-Datetime header, as the Memento protocol (RFC 7089) does. Pages are the bytes the Archive captured, so a page’s accented characters are displayed as the PC’s characters only when they’re written as HTML entities (eg, é).

Limits

A page can have up to 1,000 lines (the last one says (Page too long) if there would be more) and 500 links. WEB displays only text: an address whose page isn’t text (eg, an image) is Unable to display address, and since forms can’t be submitted, a form’s fields aren’t displayed (except a list’s choices, one per line).

Errors

Until the first page is displayed, an error ends WEB with the same messages and exit codes as FETCH (eg, Unable to find address and 53 if the page isn’t found, or Unable to connect to host and 68), except that a page that isn’t text is Unable to display address (exit code 1). An unknown switch, an invalid date, an invalid address, or a missing address when output isn’t to a console is a usage error.

Source: WEB.BAS

« WCSystem Commands »

Copyright (c) 2020-2026 Jeff Parsons Released under MIT License