From: A.Translator on
On 8th October 2007 Joe very kindly helped me with some problems on gthis forum
and we discussed the terrible heavy, slow loading lists like this one
http://www.ochrid.dds.nl/pages/lijsten/MedAlg.htm (I would include a message ID
if I knew where to find that). Joe asked: "Are you ready to get into
database-driven web development? " I answered that I would be extra motivated
to learn php if it would help with these long lists. My question was never
answered, and I have tried some php but cannot see how it would help me with
the lists. Can Joe or someone else explain? Thank you.

--
Regards,
Adriana.
[ put out the rubbish if you need to reach me by e-mail ]
www.spinsister.nl


From: Michael Fesser on
..oO(A.Translator)

>On 8th October 2007 Joe very kindly helped me with some problems on gthis forum
>and we discussed the terrible heavy, slow loading lists like this one
>http://www.ochrid.dds.nl/pages/lijsten/MedAlg.htm (I would include a message ID
>if I knew where to find that). Joe asked: "Are you ready to get into
>database-driven web development? " I answered that I would be extra motivated
>to learn php if it would help with these long lists. My question was never
>answered, and I have tried some php but cannot see how it would help me with
>the lists. Can Joe or someone else explain? Thank you.

JFTR:
The MsgID is <news:Xns99C34B7B4AE4FmakowiecatnycapdotrE(a)216.104.212.96>.

One way to keep the page shorter with scripting and maybe a database
behind it would be to not print the entire page at once, but just all
the entries for a particular letter, given as a URL parameter, e.g.

http://www.ochrid.dds.nl/pages/lijsten/MedAlg.php?show=a
http://www.ochrid.dds.nl/pages/lijsten/MedAlg.php?show=b

The current full result could then be achieved with setting the
parameter to 'all' or simply by omitting it - your decision.

With some URL rewriting (mod_rewrite on Apache servers) you could even
get nice URLs like these:

http://www.ochrid.dds.nl/pages/lijsten/MedAlg/a
http://www.ochrid.dds.nl/pages/lijsten/MedAlg/b
http://www.ochrid.dds.nl/pages/lijsten/MedAlg (would show all)

But that would be just an additional nice-to-have feature.

Using a script would also allow to reduce the whitespace in the output.
Currently there are almost 100 unnecessary indentation blanks in the
markup for _every_ entry. While they keep the markup more readable, they
can really become an issue on such a long page. I haven't counted them
exactly, but there seem to be several thousand list entries (a quick
automated line count showed >6000 lines in the rendered browser output).
So there are several hundred kilobytes of pure useless whitespace. And
since this page is served uncompressed, the visitors have to download
them all.

This leads to the next keyword: HTTP compression. This could be done
automatically with adding some directives to the server configuration
(if possible) or manually by uploading an additional gzip-compressed
version of the same document. To make it available for browsers it still
requires a little modification of the server config, but this would be
just one line in an .htaccess file if the host allows it. With such
compression the current page size could be reduced from almost 1 MB to
about 113 KB(!) - that's only 10% of the original size.

So, there are some things that could be done to improve such really long
pages. ;)

Micha
From: A.Translator on
> So, there are some things that could be done to improve such really long
> pages.

Wow, Micha, that is very helpful! Thank you. A lot of what you say is (at the
moment) over my head, but knowing something can be done will motivate me to
learn. I am having a tough time wrapping my old brain around php and need to
know I am doing it for a purpose.

Your remarks about white spaces are very useful as I had no idea they could be
a problem.

One more question, please:
If I cut up the lists in sections, say per letter, what will the visitors to
that page see? Just that letter and its content, I suppose. But the other
letters will be readily available if they click on them? (if I had all letters
at the top, as now).

And: how would the content in the database be "googable"? (The lists get a lot
of vistors that way).

Thanks again.

--
Regards,
Adriana.
[ put out the rubbish if you need to reach me by e-mail ]
www.spinsister.nl


From: Joe Makowiec on
On 06 May 2008 in macromedia.dreamweaver, A.Translator wrote:

> If I cut up the lists in sections, say per letter, what will the
> visitors to that page see? Just that letter and its content, I
> suppose. But the other letters will be readily available if they
> click on them? (if I had all letters at the top, as now).

Yes. You can put the navigation on the top of all pages.

Actually, for this you would be able to use a single page, and pull the
dataset based on a page parameter. So you'd have something like:

<a href="mypage.php?page=a">a</a>
<a href="mypage.php?page=b">b</a>
....

And the SQL calling the database would be something like:

SELECT englishTerm, dutchTerm FROM myDatabase
WHERE LOWER(LEFT(englishTerm, 1)) = [pageParameter]

> And: how would the content in the database be "googable"? (The lists
> get a lot of vistors that way).

Yes. Google doesn't care how the HTML it sees is generated. Once
you've created the page from the database, Google (and everybody else
in the world) sees a static HTML page.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/contact.php
From: A.Translator on
> Yes. Google doesn't care how the HTML it sees is generated. Once
> you've created the page from the database, Google (and everybody else
> in the world) sees a static HTML page.

Thanks again, Joe! I will study what you and Micha have said and try to lighten
the load -once I've got this mysql thing licked ;-)

--
Regards,
Adriana.
[ put out the rubbish if you need to reach me by e-mail ]
www.spinsister.nl