caching xforms-yui-calendar-min.js

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

caching xforms-yui-calendar-min.js

Alistair Miles-2
Hi all,

One of the techniques I've previously used to improve load time of an
application that has some large-ish javascript dependencies for
lower-bandwidth users is the trick of versioning the javascript file
names or using file names that are an MD5 hash of the file contents,
which allows you to set very long cache timeout directives in the web
server.

I noticed that the xforms-yuicalendar-min.js file at 398.4 kb is the
largest file to load on an orbeon xforms page, and so naturally
wondered about ways to change the file name reference in the host html
page to a versioned or md5 file name, which would allow me to set long
cache timeouts.

So I'd like to ask, what's the best way to change the link that gets
added to the host html page to use a different url?

I also noticed that "versioned resources" is one of the features
mentioned in the CE/PE compare table, that is not included in the CE
edition. I'm guessing that this is the same type of thing I'm looking
for.

I totally understand the drive to create a CE/PE split, so I'm not
going to grumble about it (and may end up getting a PE subscription at
some point), and also understand if you want to save some clever
"versioned resources" function for PE, but would really appreciate a
quick pointer on how to tweak the script url so I can do versioned
resources for myself.

Cheers,

Alistair

--
Alistair Miles
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: [hidden email]
Tel: +44 (0)1865 287669


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: caching xforms-yui-calendar-min.js

Alessandro  Vernet
Administrator
Alistair,

xforms-yui-calendar-min.js is a dynamic file and file name, which
might be different from one form to the next depending on what
features you use. That is: the file name is composed of the different
features that are used, which in turn map to JavaScript files that are
put together to form that large file you see. The code that determines
what features are used and what JavaScript files need to be put
together is in/around XFormsFeatures. You could certainly change the
Java code to add your own prefix. Of course, if you can use the PE,
the best thing would be to use the versioned resources feature as it
was designed exactly for that purpose.

Alex

On Thu, May 6, 2010 at 10:04 AM, Alistair Miles
<[hidden email]> wrote:

> Hi all,
>
> One of the techniques I've previously used to improve load time of an
> application that has some large-ish javascript dependencies for
> lower-bandwidth users is the trick of versioning the javascript file
> names or using file names that are an MD5 hash of the file contents,
> which allows you to set very long cache timeout directives in the web
> server.
>
> I noticed that the xforms-yuicalendar-min.js file at 398.4 kb is the
> largest file to load on an orbeon xforms page, and so naturally
> wondered about ways to change the file name reference in the host html
> page to a versioned or md5 file name, which would allow me to set long
> cache timeouts.
>
> So I'd like to ask, what's the best way to change the link that gets
> added to the host html page to use a different url?
>
> I also noticed that "versioned resources" is one of the features
> mentioned in the CE/PE compare table, that is not included in the CE
> edition. I'm guessing that this is the same type of thing I'm looking
> for.
>
> I totally understand the drive to create a CE/PE split, so I'm not
> going to grumble about it (and may end up getting a PE subscription at
> some point), and also understand if you want to save some clever
> "versioned resources" function for PE, but would really appreciate a
> quick pointer on how to tweak the script url so I can do versioned
> resources for myself.
>
> Cheers,
>
> Alistair
>
> --
> Alistair Miles
> Centre for Genomics and Global Health <http://cggh.org>
> The Wellcome Trust Centre for Human Genetics
> Roosevelt Drive
> Oxford
> OX3 7BN
> United Kingdom
> Web: http://purl.org/net/aliman
> Email: [hidden email]
> Tel: +44 (0)1865 287669
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet