Re: Eliminating forced HEAD/TITLE/BASE HREF - followup
I didn't see Jim Fulton's response until after posting my own workaround to the previous Digest. I am using Zope 2.1.0 beta 2 on FreeBSD 3.0, and it works great. Jim wrote:
If I create a page (in 2.1) I don't get them.
When I read this I went back and tried to find out when it does and doesn't happen. If I create a new DTML Method called 'junk', the entire source of which is Hello world! i.e., no DTML tags or HTML tags or anything, just that string... then the HTTP output from ZServer (after the headers) is exactly as Jim describes: my source string sent back to me, with no embellishments. telnet my.machine 8080 GET /junk HTTP/1.0 HTTP/1.0 200 OK Server: Zope/Zope 2.1.0b2 (source release, python 1.5.2, linux2) ZServer/1.1b1 Date: Tue, 07 Dec 1999 17:00:19 GMT Connection: close Content-Type: text/plain Content-Length: 12 Hello world!Connection closed by foreign host. However, if I go back and change the source for 'junk' to read <B>Hello world!</B> then lo and behold, look what ZServer sends me: [earlier headers the same] Content-Length: 39 <html><head></head> <B>Hello world!</B>Connection closed by foreign host. In other words, if there is any apparent HTML in there, someone is deciding it needs some decent tags so the kids at school don't laugh. :) I think the <base href> tag is added if, in addition, your method is "index_html." I do not have the time today to research this very exhaustively.
Tom Neff wrote:
I didn't see Jim Fulton's response until after posting my own workaround to the previous Digest.
I am using Zope 2.1.0 beta 2 on FreeBSD 3.0, and it works great.
Jim wrote:
If I create a page (in 2.1) I don't get them.
I was wrong. :( I was using something earlier. The version that I was using decided that text like: <b>spam</b> was plain text, because it lacks an <html>. The current version of Zope decides anything with an end tag and no XML preamble must be HTML. For now, a cleaner way to do what you want is probably to set the content type explicitly in your DTML Method: Content-Type: text/plain <b>Hello Zope!</b> Maybe we should get rid of the automagic <head> insertion. Would anyone be sorry to see it go? Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (888) 344-4332 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Maybe we should get rid of the automagic <head> insertion. Would anyone be sorry to see it go?
I would love to see it go. I never understood the benefit. -jfarr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi! I'm a signature virus. Copy me into your .sig to join the fun! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I had a routine in Frontier that took out all unneeded spaces, returns, comments etc. in HTML documents. The only place these were left was in <script> and <pre> tagged text. Is it possible for mere users to tinker with the final steps of the rendering process to make this happen? What I'd like to add is an "optimize HTML" attribute that can be added to folders/servers and have it optimize all of the HTML code sent out in this manner. The benefit (in my expierence) is anywhere from 10-20% which means about that much improvement in load speed, less traffic on net links etc. I imagine it would also need to be excluded on <textareas> for the management screens.... # # # _____________________________________________ Joshua Brauer Box 915 http://www.brauer.org Fort Collins, CO 80522 Fax: (419) 793-4120 _____________________________________________ In flying I have learned that carelessness and overconfidence are usually far more dangerous than deliberately accepted risks. -- Wilbur Wright in a letter to his father, September 1900 ____________________________________________________
participants (4)
-
Jim Fulton -
Jonothan Farr -
Joshua Brauer -
Tom Neff