Foros de discusión

Optimize Liferay Response time with HTML5 ?

Kadir BASOL, modificado hace 12 años.

Optimize Liferay Response time with HTML5 ?

Junior Member Mensajes: 91 Fecha de incorporación: 10/08/10 Mensajes recientes
hi , i ve seen some libraries jsunzip for html5 , how can we group gif / png resource files into zip file and unzip on html5 capable browser.
https://github.com/augustl/js-unzip

That makes greater response time?
Can we solve this by making any filter ?
someone have idea?
thumbnail
Tomáš Polešovský, modificado hace 12 años.

RE: Optimize Liferay Response time with HTML5 ?

Liferay Master Mensajes: 676 Fecha de incorporación: 13/02/09 Mensajes recientes
Hi

It's good practice to setup gzip compression on the web-server level, most of modern browsers are able to understand it. This means that all communication between browser and server is gzipped and therefore you don't need to zip any images/resources anymore.

-- tom
Kadir BASOL, modificado hace 12 años.

RE: Optimize Liferay Response time with HTML5 ?

Junior Member Mensajes: 91 Fecha de incorporación: 10/08/10 Mensajes recientes
gzip compression ? is it supporting transmitting many images and audio with just 1 gzip packet?
or 1 by 1 ?
i asked for group of resources will be send with just 1 tcp connection.

The solution you give is just gzip 1 by 1 all images and audio , they are not grouping as i know ?
True or not ?
thumbnail
Tomáš Polešovský, modificado hace 12 años.

RE: Optimize Liferay Response time with HTML5 ?

Liferay Master Mensajes: 676 Fecha de incorporación: 13/02/09 Mensajes recientes
OK now I understand. You want to have all-in-one package emoticon

I don't know how you want to apply all resources back into the DOM after unzipping in the browser but I assume you need to change the original HTML to
(a) remove references to that resources so browser won't load them
(b) save those references for later processing (applying to correct DOM nodes), e.g. replace <img src="..."> to <img zipped-src="...">
(c) somewhere save path to the resources you will need to package and serve for this page
(d) insert HTML/JavaScript snippet to download the zip file with resources
(e) when browser asks for the zip file you will need to know which resources you have to package, here applies the point (c), and additionally you need to process
1, CSS files and replace references to the images (with base64 strings containing image data (which seem to me now as the easiest possibility)) ?
2, JS files and somehow do the same emoticon

Also be careful because many resources are loaded from the theme, which is different web application, so you need to know how to access those files on the disk.

It's challenging but hopefully not impossible emoticon

EDIT: this you can try to implement with the servlet filter placed inside the portal web application.

-- tom