[Seaside] CSS/JS libs
Eric Hodel
drbrain at segment7.net
Thu Jun 24 03:32:41 CEST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Jun 22, 2004, at 11:26 AM, Avi Bryant wrote:
> One area where I'm running into trouble is that of CSS files. These
> need to be linked in from the <head> section, which in a streaming
> model has to be complete before the <body> starts. That means that
> all of the needed external CSS has to be determined before rendering
> any of the body. This is fine for #style methods on components (we
> can use #children to collect all of these before starting to render),
> but it doesn't allow for tricks like StyleGroup
> (http://lists.squeakfoundation.org/pipermail/seaside/2004-May/
> 003047.html), where stylesheets are brought in on demand as IDs or
> classes from their "group" are referenced. A similar problem exists
> for Javascript: ideally the <head> section would bring in any needed
> Javascript code, but we can't know for sure what's needed until we've
> rendered the page. In the case of Javascript, we can use <script>
> tags in the body itself, but at the least there's some cumbersome
> management needed to ensure that we don't include the same script
> multiple times.
Is it possible to generate a link element that points to a stylesheet
then fill the stylesheet in as you build it? (My understanding of the
Seaside/Commanche interaction is that only one request can be processed
by Seaside at a time, so not having a complete stylesheet would not be
a problem.)
You may want to look at a post on David Hyatt's weblog on how Safari
and Mozilla render documents:
http://weblogs.mozillazine.org/hyatt/archives/2004_05.html#005496
The relevant information is about halfway down the page:
In Safari 1.2 and in Mozilla-based browsers, the heuristic for
[when to render a page] is quite simple. Both browsers use a
time delay, and are unwilling to switch to the new page until
that time threshold has been exceeded.
- --
Eric Hodel - drbrain at segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFA2i89MypVHHlsnwQRAuvUAKC0cH/Y64i9COiGhkh6WpOK9srG+QCg0wz3
r8g0fp9YQ41RKId9enUYDTQ=
=0a4a
-----END PGP SIGNATURE-----
More information about the Seaside
mailing list