cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Rewriting links in js files
Date Thu, 01 Feb 2007 23:13:29 GMT
Hi,

Yes, it's me n-th time ;)

I would like to discuss link rewriting in js files and other text
resources (css for example). Obviosuly, soon or later, there will be
need (actually it already is, in Forms) to store some paths in JS files.
That means that we have to take care of rewriting links in this kind of
resources.

My proposal is to introduce new reader for this task. It would scan
whole content of file for valid URLs to rewrite, and do the job. I
think, it could be easily achieved by use of some regexps. Of course,
this new reader would implement caching because rewriting of some big
files would be quite time-consuming.

I haven't looked into the code of LinkRewritingTransformer so I'm not
sure if it's code could be reused. Even if I had to write it from
scratch I'm enough motivated but need to be sure that my work is not
waste of time.

Do you have any thoughts? Other options?

-- 
Grzegorz Kossakowski

Mime
View raw message