[opencms-dev] URL fingerprinting

Paul-Inge Flakstad flakstad at npolar.no
Mon Apr 14 09:52:24 CEST 2014


Hi Stephan,

Thanks for the tip! I didn't think of this, but you are right - of course! :)

I very much like the idea of harnessing native OpenCms capabilities instead of implementing modifications. The only thing is, in one is to set general rules (i.e. "Expires" and "ETag" header rules) for files of particular types (i.e. ".jpg", ".css" and ".js") in Apache, one must make absolutely sure *all* such resources are fingerprinted. If a resource is not fingerprinted, but still targeted by a general rule in Apache, there could (will?) be problems.

So, while it may be a great solution for some sites (smaller/simpler ones especially) and/or some file types (for example .css), it seem risky in my case. We've got a big site with a lot of pages and a lot of file types. I'm thinking things could easily go wrong somewhere.

Ideally, I  think a fingerprinting function should come in the form of a module that could easily be added and removed. But that also sounds like a lot of work x)

Cheers,
Paul

From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Stephan Hartmann
Sent: 14. april 2014 08:30
To: The OpenCms mailing list
Subject: Re: [opencms-dev] URL fingerprinting

Hi Paul,
This is possible for example with the link tag.
If you add URL query parameters, e.g. the datelastmodified of the linked file, OpenCms will generate exported versions with a fingerprint:
<cms:link>/.../my.css?t=${datelastmodified}</cms:link>
Of course you first have to read the datelastmodified and put it into page context.
And the CSS file must have set the export property to true, either directly or inherited.
Kind regards,
Stephan


2014-04-11 16:23 GMT+02:00 Paul-Inge Flakstad <flakstad at npolar.no<mailto:flakstad at npolar.no>>:
Hi,

Has anyone considered URL fingerprinting in OpenCms?

I'm Curious because I'm thinking about modifying the export/link handler (?) to manage this. Since it's already doing some modification to the URLs, it should be possible to extend that some more - right ..?

What I have in mind is adding the fingerprint when exporting (similarly to how /opencms/export/ is injected).

E.g. if the VFS resource's offline URL is
/static/my.css
the online URL would become
/opencms/export/static/my-32819023810832091.css
when requested online.

Same for images, javascript and whatnot.

With fingerprinting in place, one could set the appropriate headers in Apache (or whatever's in front) and ta-daaaa pages would load (possibly a lot) faster, because many resources would be cached client-side.

Would sure like to hear your thoughts on this, if you have any.

(Don't know about URL fingerprinting? Then you should read this: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching)

Cheers,
Paul

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140414/50aba63e/attachment.htm>


More information about the opencms-dev mailing list