Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Kadir BASOL
Optimize Liferay Response time with HTML5 ?
9 de enero de 2012 2:28
Respuesta

Kadir BASOL

Ranking: Junior Member

Mensajes: 91

Fecha de incorporación: 10 de agosto de 2010

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?
Tomas Polesovsky
RE: Optimize Liferay Response time with HTML5 ?
10 de enero de 2012 13:47
Respuesta

Tomas Polesovsky

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 641

Fecha de incorporación: 13 de febrero de 2009

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
RE: Optimize Liferay Response time with HTML5 ?
11 de enero de 2012 0:39
Respuesta

Kadir BASOL

Ranking: Junior Member

Mensajes: 91

Fecha de incorporación: 10 de agosto de 2010

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 ?
Tomas Polesovsky
RE: Optimize Liferay Response time with HTML5 ?
11 de enero de 2012 13:21
Respuesta

Tomas Polesovsky

LIFERAY STAFF

Ranking: Liferay Master

Mensajes: 641

Fecha de incorporación: 13 de febrero de 2009

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