1 / 7

JAWR

JAWR. Agrupar y comprimir javascript y css. Motivación. Reducir cantidad de peticiones HTTP Reducir el tiempo de carga de las páginas. ¿Qué propone?. ¿Cómo realizarlo?. jawr.properties

betsy
Download Presentation

JAWR

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JAWR Agrupar y comprimir javascript y css

  2. Motivación • Reducir cantidad de peticiones HTTP • Reducir el tiempo de carga de las páginas

  3. ¿Qué propone?

  4. ¿Cómo realizarlo? • jawr.properties jawr.js.bundle.basedir=/jsjawr.js.bundle.all.id=/all.jsjawr.js.bundle.all.mappings=/js/jquery/**,/js/jquery-ui/**jawr.css.bundle.basedir=/cssjawr.css.bundle.all.id=/all.cssjawr.css.bundle.all.mappings=/css/jquery-ui/**

  5. ¿Cómo realizarlo? • Agregar jawr a un jsp <%@ taglib uri="http://jawr.net/tags" prefix="jwr"%> <html> <head> <jwr:script src="/all.js" /> <jwr:style src="/all.css" /> <title>Taller de Jawr</title> </head>

  6. ¿Cómo realizarlo? • web.xml <servlet> <servlet-name>JavascriptServlet</servlet-name> <servlet-lass>net.jawr.web.servlet.JawrServlet</servlet-class> <init-param> <param-name>configLocation</param-name> <param-value>/jawr.properties</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>JavascriptServlet</servlet-name> <url-pattern>*.js</url-pattern> </servlet-mapping>

  7. Resultado

More Related