Hi
Currently in my pages I have the following files downloaded as part of the request
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/jquery/jquery.js"></script>
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/jquery/plugins/tooltip/jquery.qtip-1.0.min.js"></script>
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/primefaces/core/core.js"></script>
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/primefaces/tooltip/tooltip.js"></script>
<link rel="stylesheet" type="text/css" href="/application/primefaces_resource/2.1.RC1/jquery/plugins/ui/jquery.ui.dialog.css" />
<link rel="stylesheet" type="text/css" href="/application/primefaces_resource/2.1.RC1/jquery/plugins/ui/jquery.ui.resizable.css" />
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/jquery/plugins/ui/jquery-ui.custom.js"></script>
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/primefaces/dialog/dialog.js"></script>
<link rel="stylesheet" type="text/css" href="/application/primefaces_resource/2.1.RC1/jquery/plugins/ui/jquery.ui.button.css" />
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/primefaces/button/button.js"></script>
<script type="text/javascript" src="/application/primefaces_resource/2.1.RC1/primefaces/ajaxstatus/ajaxstatus.js"></script>
And sometimes it is fewer or sometimes more.
I am looking at minifying and possibility of consolidating the CSS and JS files before they are delivered to Client browser so that I can get the performance benefits as outlined in http://code.google.com/speed/page-speed ... yload.html.
Wondering if anyone else as already given it a shot and if so any challenges you ran into?
P.S. I have already done it on my blog http://www.prudentcloud.com and they have really helped.
Consolidating and Compressing JS and CSS
Netbeans 7.2| GlassFish 3.2 | PostgreSQL 9.1| MongoDB | Primefaces 3.4.2
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi,
PrimeFaces included resources are already minified and compressed. With appropriate cache headers they are also loaded once per client.
PrimeFaces included resources are already minified and compressed. With appropriate cache headers they are also loaded once per client.
Thanks Cagatay. Just noticed that the files were minified already.
Netbeans 7.2| GlassFish 3.2 | PostgreSQL 9.1| MongoDB | Primefaces 3.4.2
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Yes, at build time resources are compressed before going into output jar. We use a maven plugin for this that is based on YUI compressor.
Good to know. Also good to see that with Themeroller/New Theming you guys started using sprites. That helps too. I am building a consumer web app and any/all performance boosts I can get would be great.
Netbeans 7.2| GlassFish 3.2 | PostgreSQL 9.1| MongoDB | Primefaces 3.4.2
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
Hi,
minified and compressed files are good but not enough. In my web apps I merge all JS to one big file and CSS files to one during maven project bulding. I can create so many files as I want, don't matter, they will merged to one with the same name as project / artefact name (e.g. myproject.js and myproject.css) and the download time is drastic reduced.
minified and compressed files are good but not enough. In my web apps I merge all JS to one big file and CSS files to one during maven project bulding. I can create so many files as I want, don't matter, they will merged to one with the same name as project / artefact name (e.g. myproject.js and myproject.css) and the download time is drastic reduced.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I agree, merging all js to one js and all css to one css would be the next step, we've discussed that in short but can't find a way that time.
Hello Cagatay,
No problem. YUI compressor plugin with a light adjustment can do it for your
No problem. YUI compressor plugin with a light adjustment can do it for your
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
Oleg
Thanks for sharing the information. Would you mind sharing more details on the Maven integration.
I am considering adding this to Ant build script itself - based on this post I found
http://javaflight.blogspot.com/2008/01/ ... -task.html
Maybe we can persuade Cagatay to post the collective findings somewhere in the Primefaces site under best practices until such time as his team finds a slot in their schedule to incorporate it natively.
Thanks for sharing the information. Would you mind sharing more details on the Maven integration.
I am considering adding this to Ant build script itself - based on this post I found
http://javaflight.blogspot.com/2008/01/ ... -task.html
Maybe we can persuade Cagatay to post the collective findings somewhere in the Primefaces site under best practices until such time as his team finds a slot in their schedule to incorporate it natively.
Netbeans 7.2| GlassFish 3.2 | PostgreSQL 9.1| MongoDB | Primefaces 3.4.2
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
_______________________________________________________________
Subraya Mallya
http://tinyhabit.com |http://twitter.com/tinyhabit
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests