Gossamer Forum
Home : Products : DBMan : Customization :

Avoiding refresh tag in HTML - getting db.cgi to display immediately

Quote Reply
Avoiding refresh tag in HTML - getting db.cgi to display immediately
The home page of my site -- http://www.labourstart.org -- is the last 50 records in default.db. But my ISP's web server is using index.html as the default home page. I've had to stick a refresh tag there to load the dbman-based home page. I've been trying to use frames to avoid this, with no luck so far. I can use SSI but include will not work on files not in the same directory of the file being read. Anyone have any ideas how to speed up the display of the dbman results or to put them in place of index.html? Thanks!

Eric
Quote Reply
Re: Avoiding refresh tag in HTML - getting db.cgi to display immediately In reply to
One suggestion (if you ISP allows index.cgi as a default page) is to move your index.cgi under your root. This is just a thought and not tested. I know that other perl scripts and cgi scripts can run outside of the cgi-bin. (But it depends on your server configurations.)

You could change the mapping of the cgi file in the default.cfg file to your root directory. Then you could change the require statements in your default.cgi file to go to the appropriate directory and files.

Again, this is just a thought...Try it and see if it works.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Avoiding refresh tag in HTML - getting db.cgi to display immediately In reply to
Hi Eric

Depending on how Apache is set up you might be able to overide the limitation on SSI with a .htaccess file in your DocumentRoot.

However I'm not sure how to do this... you could try telneting into your server, and finding the apache .conf files and email them to me and I'll have a look and see if I can work it out. The files are usually httpd.conf and possible srm.conf and access.conf, and are often in either /etc/httpd/conf/ or /usr/local/apache/conf/

Chris
Quote Reply
Re: Avoiding refresh tag in HTML - getting db.cgi to display immediately In reply to
Chris - I didn't see SSI as a solution because the URL I'd like to have come up is such a complex one. In any event, I won't have access to the Apache configuration on my ISP.

Actually, the solution that came nearest to mind is something I do manually -- once a day, I call up the page and save it as index.html on my disk and upload this to another server which is my mirror site.

If there was some way to automatically do this every 5 minutes or so, I could save the page as index.html. (That's if I'm allowed to run chron, or whatever, on the server.)

Eric
Quote Reply
Re: Avoiding refresh tag in HTML - getting db.cgi to display immediately In reply to
Hi Eric

The length of the URI should not be a problem, on this site: http://www.lizdavies.org the latest news items are displayed using this:

Code:
<!--#include virtual="/cgi-bin/lizdavies/news/db.cgi?db=default&uid=default&ID=*&sb=0&so=descend&mh=4&view_records=1&ssi=1" -->

I don't see why this could not be a even longer URI.

BTW I finally got around to sorting out the code used on Liz Davies site and it can be found here: http://www.gossamer-threads.com/...es/Detailed/443.html - it has the code in it for not displaying all the HTML when it's called by SSI - ssi=1 include bit above.

Chris
Quote Reply
Re: Avoiding refresh tag in HTML - getting db.cgi to display immediately In reply to
Unbelievable! That actually worked!
I had no idea that using "virtual" with no further changes would work. As a result, I've created a very short index.shtml page, included the line of code, and now when you click on http://www.labourstart.org you get exactly what I wanted. This is much faster than using the refresh tag. Thanks Chris! You're a genius!
Quote Reply
Re: Avoiding refresh tag in HTML - getting db.cgi to display immediately In reply to
Hi Eric

Glad it worked :-)

One thing you need to do is something like I did with ssi=1 - at the moment you have two sets of heads:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>LabourStart</title>
</head>
<body>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>LabourStart: Where trade unionists start their day on the net</TITLE>
<link rel="stylesheet" type="text/css" href="http://www.labourstart.org/ls.css" title="style1">
<meta http-equiv="Expires" content="Wed, 6 May 1998 04:00:00 GMT">
<meta name="keywords" content="labor labour movement trade unions trade-unions workers working class labourstart">
<meta name="description" content="The premiere international trade union website, featuring daily labour news, urgent actions, labour links, the labour website of the week, global labour calendar, and much more.">
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" by "ericlee@labourstart.org" for "http://www.labourstart.org/" on "1997.06.06T02:02-0500" r (n 0 s 0 v 0 l 0))'>
</head>
<body>

it's the same at the footer.

The way around this that I have is all SSI calls to the DB have ssi=1 in the URI then this causes the extra header not to be printed.

Chris