Subject: npds Digest V2 #54

From: Listar <nospam_listar_at_ml.free_dot_fr>
Date: Sun, 26 Aug 2001 03:10:37 +0200 (CEST)

------------------------------------
npds Digest	Sat, 25 Aug 2001	Volume: 02  Issue: 054

In This Issue:
		[NPDS] Re: Referencing External Style Sheet
		[NPDS] Re: Referencing External Style Sheet
		[NPDS] Re: Referencing External Style Sheet
		[NPDS] Re: Referencing External Style Sheet
		[NPDS] Re: Referencing External Style Sheet

----------------------------------------------------------------------

Date: Sat, 25 Aug 2001 09:04:08 +0200
From: Paul Guyot <nospam_pguyot_at_kallisys_dot_net>
Subject: [NPDS] Re: Referencing External Style Sheet

>After struggling to edit my custom style sheet using the NPDS Setup text
>editor, I thought of a better solution. You could get rid of the editor
>by using an external .css file stored in the same folder as the default
>index.html document that NoteServ uses. This would require a modification
>NoteServ so that it does not serve up .css-based notes.

Actually, I thought about something different. We could have NPDS 
serving the .css page and have therefore an external css. The problem 
is that if it doesn't find some clues that it's an html document, 
NPDS adds plenty of stuff (such as the title of the note and so on) 
which we don't want for .css style sheets.

Having an internal .css was required because NPDS wasn't able to 
serve two documents at the same time. Now it is (with all the 
problems we know because I've just hacked the code to do that).

So what do you think? Anyone to convince me to keep an embedded .css?

Paul
-- 
Home page: http://www.kallisys.com/
Newton-powered WebServer: http://newt.dyndns.org:8080/

------------------------------

Subject: [NPDS] Re: Referencing External Style Sheet
Date: Sat, 25 Aug 2001 09:48:09 -0600
From: Grant Hutchinson <nospam_grant_at_splorp_dot_com>

In a previous message, Paul Guyot typed vigorously:

>Having an internal .css was required because NPDS wasn't able to 
>serve two documents at the same time. Now it is (with all the 
>problems we know because I've just hacked the code to do that).

But even with an external .css file, NPDS doesn't really serve two files 
at the same time. It only needs to reference the .css file (like it does 
for the internal one) for insertion into the various .html files that get 
served.

Isn't this correct?

g.

......................................................................

Grant Hutchinson                       Interface Considerations & Toys

Live video served fresh since 1996.    http://www.splorp.com/
Now fortified with daily ramblings.    http://www.splorp.com/blog/
Newton. It's the Palm with a brain.    http://www.splorp.com/newton/

------------------------------

Date: Sat, 25 Aug 2001 12:28:10 -0400 (EDT)
From: Victor Rehorst <nospam_chuma_at_chuma_dot_org>
Subject: [NPDS] Re: Referencing External Style Sheet

On Sat, 25 Aug 2001, Grant Hutchinson wrote:

> But even with an external .css file, NPDS doesn't really serve two files 
> at the same time. It only needs to reference the .css file (like it does 
> for the internal one) for insertion into the various .html files that get 
> served.
> 
> Isn't this correct?

Er... I think the situation right now is that NPDS embeds the CSS into the
header (<HEAD> ... </HEAD>) of every HTML document it serves.  I think
what Paul is saying is that NPDS can now server the CSS at a URL and
merely embed a link to it in all HTML pages.  Right?

------Victor Rehorst -- [email-masked] | [email-masked]
------Chairperson. College of Arts Student Union, University of Guelph------
---- Webmaster, United Network of Newton Archives:  http://www.unna.org ----
-------------- Homepage and Newton Stuff: http://www.chuma.org -------------

------------------------------

Date: Sat, 25 Aug 2001 10:53:06 -0700
Subject: [NPDS] Re: Referencing External Style Sheet
From: "Josh mac.com" <nospam_senorwences_at_mac_dot_com>

on 8/25/01 12:04 AM, Paul Guyot at [email-masked] wrote:

> 
> So what do you think? Anyone to convince me to keep an embedded .css?

I like the self-contained nature of it, simply because I don't really have a
box sitting somewhere where I would keep an .css, and also because it
provides a true portability.  I can take my Newton and NPDS anywhere in the
world, and so long as I can get on an ethernet network or dial up on an
analog phone line I could be running a self-contained web server.  There is
something extremely geeky about that.

But this is not to say that there shouldn't be a way to externally reference
a .css.  But I would like the embedded .css to stay because it very much
suits my needs for NPDS.

Thanks,

Josh Burker

------------------------------

Date: Sat, 25 Aug 2001 12:50:41 -0500
From: Matt Vaughn <nospam_matt.vaughn_at_mindspring_dot_com>
Subject: [NPDS] Re: Referencing External Style Sheet

I think if NPDS is capable of serving two files at once, then you should 
definitely make serving the CSS as a separate file the default option. 
This is much more in line with the HTML 4.0 standard of separating content 
and display information. Honestly, the only reason I chose to embed the 
style sheet in all pages was that NPDS was limited to serving a single 
page at a time, so I chose the path of compromise.

Might I suggest that you add support (I can't remember if nHTTPd sends 
this header correctly or not) for sending a last-modified header. Then, 
send a constant last-modified time for the style sheet. Browsers that 
exhibit proper cacheing behavior will then only retrieve the style sheet 
once, the first time it is requested. All other requests for it will be 
served from the browser's cache.

As for the modification of NPDS to avoid HTML-izing the CSS files, all you 
have to change is the code section in NoteServ that looks first to the 
title for *.html. Add in code to catch *.css as well and you'll be set. 
You'll also want to modify the routines that generate lists of servable 
notes for display (the code that spits out HTML to replace, for instance, 
the NOTE_LIST server side include) to ignore notes with *.css in their 
titles.

Matt

On Saturday, August 25, 2001, at 02:04  AM, Paul Guyot wrote:

>> After struggling to edit my custom style sheet using the NPDS Setup text
>> editor, I thought of a better solution. You could get rid of the editor
>> by using an external .css file stored in the same folder as the default
>> index.html document that NoteServ uses. This would require a modification
>> NoteServ so that it does not serve up .css-based notes.
>
> Actually, I thought about something different. We could have NPDS serving 
> the .css page and have therefore an external css. The problem is that if 
> it doesn't find some clues that it's an html document, NPDS adds plenty 
> of stuff (such as the title of the note and so on) which we don't want 
> for .css style sheets.
>
> Having an internal .css was required because NPDS wasn't able to serve 
> two documents at the same time. Now it is (with all the problems we know 
> because I've just hacked the code to do that).
>
> So what do you think? Anyone to convince me to keep an embedded .css?
>
> Paul
> -- Home page: http://www.kallisys.com/
> Newton-powered WebServer: http://newt.dyndns.org:8080/
>
> [NPDS Mailing List: To unsubscribe: mailto:npds-
> [email-masked]?subject=unsubscribe]
>

------------------------------

Date: Sat, 25 Aug 2001 20:24:59 +0200
From: Paul Guyot <nospam_pguyot_at_kallisys_dot_net>
Subject: [NPDS] Re: Referencing External Style Sheet

>Er... I think the situation right now is that NPDS embeds the CSS into the
>header (<HEAD> ... </HEAD>) of every HTML document it serves.  I think
>what Paul is saying is that NPDS can now server the CSS at a URL and
>merely embed a link to it in all HTML pages.  Right?

Indeed, thanks Victor.

Paul
-- 
Home page: http://www.kallisys.com/
Newton-powered WebServer: http://newt.dyndns.org:8080/

------------------------------

Date: Sat, 25 Aug 2001 20:27:10 +0200
From: Paul Guyot <nospam_pguyot_at_kallisys_dot_net>
Subject: [NPDS] Re: Referencing External Style Sheet

>I think if NPDS is capable of serving two files at once, then you 
>should definitely make serving the CSS as a separate file the 
>default option. This is much more in line with the HTML 4.0 standard 
>of separating content and display information. Honestly, the only 
>reason I chose to embed the style sheet in all pages was that NPDS 
>was limited to serving a single page at a time, so I chose the path 
>of compromise.

It's what I understood.

>Might I suggest that you add support (I can't remember if nHTTPd 
>sends this header correctly or not) for sending a last-modified 
>header. Then, send a constant last-modified time for the style 
>sheet. Browsers that exhibit proper cacheing behavior will then only 
>retrieve the style sheet once, the first time it is requested. All 
>other requests for it will be served from the browser's cache.

Actually, you already wrote that part ;)

>As for the modification of NPDS to avoid HTML-izing the CSS files, 
>all you have to change is the code section in NoteServ that looks 
>first to the title for *.html. Add in code to catch *.css as well 
>and you'll be set. You'll also want to modify the routines that 
>generate lists of servable notes for display (the code that spits 
>out HTML to replace, for instance, the NOTE_LIST server side 
>include) to ignore notes with *.css in their titles.

Yes, and also avoid notes posted by users for this purpose and change 
the MIME type to send this information.

As soon as I have some time, I'm going to write it, unless someone 
else wants to do it, it's open source after all.

Paul
-- 
Home page: http://www.kallisys.com/
Newton-powered WebServer: http://newt.dyndns.org:8080/

------------------------------

Subject: [NPDS] Re: Referencing External Style Sheet
Date: Sat, 25 Aug 2001 15:18:06 -0600
From: "Grant [Voxel Mapping] Hutchinson" <nospam_grant_at_splorp_dot_com>

In a previous message, Victor Rehorst typed vigorously:

>Er... I think the situation right now is that NPDS embeds the CSS into the
>header (<HEAD> ... </HEAD>) of every HTML document it serves.  I think
>what Paul is saying is that NPDS can now server the CSS at a URL and
>merely embed a link to it in all HTML pages.  Right?

I think that's what I tried to say in the first place. I was confused 
because I wasn't thinking in terms of the style sheet getting _served_ by 
NPDS, only referenced by the other HTML documents. It's clear now.

Thanks guys.

g.

......................................................................

Grant Hutchinson                       Interface Considerations & Toys

Live video served fresh since 1996.    http://www.splorp.com/
Now fortified with daily ramblings.    http://www.splorp.com/blog/
Newton. It's the Palm with a brain.    http://www.splorp.com/newton/

------------------------------

Subject: [NPDS] Re: Referencing External Style Sheet
Date: Sat, 25 Aug 2001 15:21:27 -0600
From: "Grant [Voxel Mapping] Hutchinson" <nospam_grant_at_splorp_dot_com>

Hi Josh.

An external .css file doesn't have to be on another box or another 
server. The style sheet would exist in the same NotePad folder along side 
the other notes and the main index.html file that NPDS uses. Therefore, 
it would be self-contained on your Newton, but not self-contained within 
the NPDS editing environment anymore.

g.

>I like the self-contained nature of it, simply because I don't really have a
>box sitting somewhere where I would keep an .css, and also because it
>provides a true portability.  I can take my Newton and NPDS anywhere in the
>world, and so long as I can get on an ethernet network or dial up on an
>analog phone line I could be running a self-contained web server.  There is
>something extremely geeky about that.
>
>But this is not to say that there shouldn't be a way to externally reference
>a .css.  But I would like the embedded .css to stay because it very much
>suits my needs for NPDS.

......................................................................

Grant Hutchinson                       Interface Considerations & Toys

Live video served fresh since 1996.    http://www.splorp.com/
Now fortified with daily ramblings.    http://www.splorp.com/blog/
Newton. It's the Palm with a brain.    http://www.splorp.com/newton/

------------------------------

End of npds Digest V2 #54
*************************