Theming performance tips

jqGrid for ASP.NET uses the jQuery UI ThemeRoller themes, giving you access to 25 professionally designed themes and a great theme authoring tool. One of the biggest benefits of using this approach is that these themes are hosted on many CDNs (Content Delivery Networks) for free. CDNs offload traffic from your site and serve the theme (css and images) from many servers around the world, depending on where the end-user requesting it is located. This will offload traffic from your server and will optimize the speed since CDNs take care of finding the fastest/closest server.

The biggest CDN network for jQuery/ThemeRoller is provided by Google. This means that instead of copying the theme locally on your server and referencing it from there, you can do something along the lines of:

Cupertino theme (Apple-like UI):

<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/cupertino/jquery-ui.css" />

Redmond theme (Windows-like UI)

<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" />

Note, that since this is a remote request, customers must have access to the internet in order to access CDNs, so this may not be a viable approach for Intranet/Internal sites. Some corporate users may also restrict access to certain external resources.


  Last Updated: 11/11/2009 | © Trirand, 2009