★ wanayoo — archive 1999 http://webdeveloper.com/drweb/96Nov04-drwebsite.htmlNouvelle recherche | Portail wanayoo

DR. WEBSITE

[an error occurred while processing this directive]

Using the META Tag to Refresh Pages and Redirect Visitors

Dear Dr. Website: What does the following tag mean? <META HTTP-EQUIV="Refresh" CONTENT="1800">. I noticed that CNN uses it in its main page.

The <META> tag can hold information about an HTML document that hasn't been covered elsewhere in the head of the document. Its HTTP-EQUIV attribute can specify additional information that the server should send in response when the document displays. For example, the HTTP-EQUIV attribute in the code you cited tells the server to reload its data after a certain amount of time. The CONTENT attribute specifies, in seconds, the given amount of time after which the page should reload itself. Here the CONTENT value is 1800, which means every 30 minutes (1,800 seconds). This technique for dynamically updating pages is an example of a Netscape invention called "client pull." It's useful for sites like CNN that constantly update their pages during the day. If you've pointed your browser to CNN's page, for example, and keep that page displaying on your screen for some time, it should reload at continual intervals all day. Another special use for the <META> tag is in loading a different document after the given interval specified in the CONTENT attribute. You would do this by specifying a URL in a URL attribute within the <META> tag. In this way, you can automatically redirect visitors to a different page (for example, if you've moved your Web site and visitors are still flocking to your old URL), or you could create a slide-show effect by loading a number of different Web documents in rapid succession.

LIMITS ON COOKIE DATA

Dear Dr. Website: I'm trying to implement cookies on my site to store a large amount of customer data. However, I keep losing data in the very last field that the customer inputs. Am I doing something wrong, or is there a limit to how much cookie data I can save?

According to Netscape's Persistent Client-State HTTP Cookiesspecification, there are definite limits on how many cookies a client can receive and store at any given time. A client can only store up to 20 cookies from any given domain name, up to a total of 300 cookies from all sources. In addition, there's a physical limit on the size of a single cookie, namely 4K. If it turns out that you've specified just one too many cookies, one workaround is to capture the database information previously stored in the last two cookies as a single cookie, with a delimiter separating the two item/value pairs, and compelling your CGI script to do the extra work in distinguishing the different kinds of data saved therein.

CONVERTING TABLES TO HTML

Dear Dr. Website: I have dozens of spreadsheets--some are in Excel, others have had their data imported to word processing programs in tab-delimited format--that I now need to include in Web pages. What would be the easiest way to add the right HTML tags to these tables automatically?

You have a wealth of options for preparing your table data for display on the Web. First, there are several add-ons and macros you can use with Excel to format data generated there into HTML. For example, Internet Assistant for Microsoft Excelis a free add-on you can download from Microsoft's Web site. You can also find other Excel-specific solutions at the W3 Consortium's Miscellaneous Filters pages. There are also a number of useful online resources geared toward formatting spreadsheet data into tables for Web pages. Instant Tables from Two Clicks and TableMaker are free online services where you can paste in spreadsheet data or tab-delimited data in an interactive form, set a variety of preferences, then automatically generate and view a table on a separate HTML page. In addition, many HTML authoring tools have good features for converting tables from spreadsheets or word processing documents into HTML tables. You can find summarized lists of some of these conversion tools at the W3 Consortium's Word Processor Filters page.


Please send your site design and development questions to webdoc@iw.com, or visit the Ask Dr. Website page.
Reprinted from Web Week, Volume 2, Issue 17, November 4, 1996 © internet.com Corporation All rights reserved. Keywords: HTML, HTMLTools Date: 19961104

http://www.internet.com/