[Seaside] static resources and urls

Avi Bryant avi@beta4.com
Fri, 3 May 2002 19:07:31 -0700 (PDT)

After Nevin's struggles to move his Dreamweaver templates into Seaside,
I've been thinking a bit about static resources.  The problem is that you
really want to have both of these properties:

1. Relative paths in the urls of <img> src attributes, etc.  Templates
should not have hardcoded paths in them, obviously, and the hacks
involving dynamically inserting a prefix seem to be confusing and
problematic, not to mention interfering with previews in WYSIWYG tools.
I've experimented with using semi-relative paths like /seaside-resources,
but Julian has convinced me that it's a bad idea - it groups all resources
for all apps in the system together, and just isn't very flexible.

2. Cachable urls - this one's a no brainer: you simply can't have the
browser downloading the same image many times, so the urls have to be
quite stable.

The problem is that with the current url scheme, those two needs are
incompatible.  Any relative path off a Seaside url is going to be highly
unstable, because Seaside urls are such constantly changing things.
However, is there any reason they have to be?  Right now, a typical URL
looks like


however, what issues would arise if that changed to



Apart from some necessary massaging of Seaside's internals, I don't see
anything wrong with making such a change, and it would easily allow some
kind of 'resource/foo.jpg' scheme.  Does anyone else have any comments or

Incidentally, I ran into another annoying issue with using WYSIWYG
editors: whenever I try to use the @shorthand for a link's sea:id, GoLive
insists on making it into a mailto.  Sigh.  Guess I should have used
a different special character.