Friends

ezPublish 4.3 - admin panel js/css after clustering with eZDBFileHandler

If you have ezPublish 4.3 installation in clustering with eZDBFileHandler  you'll see that CSS and Javascript files does not get served properly for Admin site. If you check the network request logs, it shows a 404 error. After lot of debugging and search , I found that there is something wrong in ezdbfile database table. Script "clusterize.php" does not update the datatype for admin css and js files properly.

Firefox is able to overcome this problem and just serves them correctly, but Chrome , IE and Safari will just download the file on the desktop, thus preventing it from rendering correctly.

To solve this problem you need to do manual update for datatype for those records. Replace the datatype as "text/css" and "text/javascript" for those records.


UPDATE ezdbfile SET datatype = 'text/css' WHERE name LIKE '%/cache/public/stylesheets/%';
UPDATE ezdbfile SET datatype = 'text/javascript' WHERE name LIKE '%/cache/public/javascript/%';

Linux command - find large size files

We often come across problems like disk utilization 100%. In such situation, there is need to know the files which are occupying large amount of disk space. So to find out such files e.g. in this case files having size greater than 50 MB in current directory, command will be as follows:

find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

enjoy !!

Zend Framework - Bootstrap optimization quick step

I am using zend framework 1.11.11 in one of my application. I have written different _init methods in bootstrap to inilialize seesion,  database connection, loading navigation, view helpers etc.  It worked well initially when traffic to site is low. Afterwords i found that it is affecting performance. So I combined all things under one _init method.


class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {


protected function _initApp() {


$moduleLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
               }

                 ## DB initialization ####
                 ## Zend_Registry::set ####
                 ## SMTP initialization ####

}

Quick SEO Tips : Interlinking


Inter-Linking pages:
  • Do not Focus only on Home Page
  • User proper Anchor Texts : Anchor Texts are the hyperlinked texts which link pages Avoid using generic texts like “Click Here” to optimize your page. Also ensure that your anchor texts are short and precise.
  • Avoid too many Anchor Texts: Too much of anything is bad. Too many anchor texts distracts the visitor. Concentrate on certain well thought of keyword rich anchor text for your pages.
  • Go for Absolute Links instead of Relative Links: Absolute Links ensure that pages pull each other up in Search Engine Result Pages.
  • Proper Navigation across site: The closer the page is from the Home Page, the more importance search engines give to the page. Ensure that your most important pages are in close proximity to the Home Page.

Tip - Page load time improvement

Here is a quick tip to reduce the page load time.

As you know for each HTTP request there happens three-way handshake. So if you are fetching content from external objects and showing on  page, it will be quite helpful to turn on HTTP keepalives for external objects. Otherwise you add an extra round-trip to do another TCP three-way handshake and slow-start for every HTTP request. If you are worried about hitting global server connection limits, set the keepalive timeout to something short, like 5-10 seconds. Also look into serving your static content from a different webserver than your dynamic content. Having thousands of connections open to a stripped down static file webserver can happen in like 10 megs of RAM total, whereas your main webserver might easily eat 10 megs of RAM per connection.

Browser rendering optimization


Use efficient CSS selectors 
1. Avoid a universal key selector.
Allow elements to inherit from ancestors, or use a class to apply a style to multiple elements.
2. Make your rules as specific as possible.
Prefer class and ID selectors over tag selectors.
3. Remove redundant qualifiers.
These qualifiers are redundant:
·         ID selectors qualified by class and/or tag selectors
·         Class selectors qualified by tag selectors (when a class is only used for one tag, which is a good design practice anyway).
4. Avoid using descendant selectors, especially those that specify redundant ancestors.
For example, the rule body ul li a {...} specifies a redundant body selector, since all elements are descendants of the body tag.
5. Use class selectors instead of descendant selectors.
For example, if you need two different styles for an ordered list item and an ordered list item, instead of using two rules:
ul li {color: blue;}
ol li {color: red;}
You could encode the styles into two class names and use those in your rules; e.g:
.unordered-list-item {color: blue;}
.ordered-list-item {color: red;}
If you must use descendant selectors, prefer child selectors, which at least only require evaluation of one additional node, not all the intermediate nodes up to an ancestor.
6. Avoid the :hover pseudo-selector for non-link elements for IE clients.
If you use :hover on non-anchor elements, test the page in IE7 and IE8 to be sure your page is usable.   If you find that :hover is causing performance issues, consider conditionally using a JavaScript onmouseover event handler for IE clients.

In my next post I will explain the more techniques .. So stay tune....

DHTMLX - Ajax-enabled JavaScript grid control



dhtmlxGrid is an Ajax-enabled JavaScript grid control with cutting-edge functionality, powerful data binding, and excellent performance with large datasets. The component is easy-to-use and provides great flexibility due to its rich client-side API. dhtmlxGrid supports different datasources (XML, JSON, CSV, JavaScript array, and HTML table), and can be also loaded from custom XML format if needed.

More info

Twitter Delicious Facebook Digg Stumbleupon Favorites More