Skip to main content

How to Increase Page Download Speed

There are some basic steps you can follow...
1. Minimize the number of HTTP requests in pages.
Eliminate all unnecessary items from your page. Try to club small css files in a single one. Use less images in your page. More HTTP requests will in crease your page speed.
2. Optimize Images.
Normally images are the heaviest files in a page. Try to optimize the images as much as possible. Use better image editingsoftwares and make them as small as possible in weight.
3. Minify Scripts.
Try to minify scripts like JS, CSS, HTML. Jquery has minified versions of all of their versions. Also minify the CSS files. This will increase your page speed pretty good.
4. Compress contents
Use server features for GUNZIP the pages. This will compress the pages and deliver it to the user browser much faster. Apache has default plugins for this.
5. Defer Page Loading
Try to use ajax or similar technologies to deffer the page load. Load different parts of the page separately through ajax. This will give a much smoother experience to the user.
6. Use external paths for JS and CSS files. 
Try to use external servers to keep JS and CSS files. This will give parallel download of files. Most of the leading JS libraries gives popular CDN servers for JS files.
7. Use CDN.
If your site is image heavy, try using CDN technology. This will serve the media files from the nearest servers of the requested ip. So the page load time will be much faster. 
8. Load JavaScript at the End
Try to load the JS files at the end of file. As the JS blocks everything below this, while executing or loading. Heavy or complex JSfiles at the top of the page may slow down the pages heavily.
9. Optimize your code.
Write code in efficient manners. Try to wave out all un necessary codes or CSS classes. Better and managed codes can save u hundreds of lines, because every byte matters.
10. Dont resize images using HTML.
Always re-size the images properly before rendering in the pages. The smaller the pages, the less will be the download time. Resizing with HTML actually download the bigger image and then shows it small.
11. Avoide 404
404 in a page can slow down the page and the server drastically. Use debugging tools to find out 404 links and correct then.
Hope the above points help you to make your web pages much faster... Suggest me some more as well. Because there are several methods, i have not mentioned here...


Popular posts from this blog

Shell Script to check tomcat status and restart

The below script checks the status of a particular tomcat status and restarts it if the tomcat does not respond....TOMCAT_HOME=/usr/local/tomcat-folder/

is_Running ()

        wget -O - >& /dev/null
 if( test $? -eq 0 ) then
  return 0
  return 1

kill_Hanged_Processes ()
 echo "killing hanged processes......"
 javaProcs=`ps -efl| grep -v grep | grep java`
 if(test ! -z "$javaProcs") then
  echo "nonzero"
  processId=`echo $javaProcs | awk '{ print $2} '`
  echo "$processId"
  kill -9 $processId
stop_Tomcat ()
 echo "shutting down......"

start_Tomcat ()
 echo "starting......"

restart ()
 sleep 10
 sleep 60

send_Mail ()
# script to send simple email
# email subject
SUBJECT=" went down"
# Email To ?
# Em…

Getting access to menu from portlet in liferay

The below code describes the way of accessing menu items from the portlet. Here i have called it from jsp. The best thing about this is you can use the beautiful permission management of menu items of liferay as well without bothering about that. Writing services for fetching menu names from the layout tables will need more codes for permission managements......

Hope this helps.........

* Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
<%@ page import="…

Virus f Opyum Team

Symptoms :: 
Several processes running named f or i. 
Network choked
Apache Dead
Unknown entry  * * * * * root f Opyum Team in crontab

Investigate ::
Try to kill the f process and even root will be unable to kill it. Check file named f and i in /etc or /bin or /usr/sbin directory. Try to delete, the file f  will not delete.  Some unknown .jpg files will be there in the same folder. 

Solve :: The root is unable to delete the file f because of the immutable bit in f
To remove it use ses or chattr
Follow the below steps to remove it completely.....

remove the unknown .jpg files in system folders

(kill process f) option k

#ses -i /bin/f
#rm /bin/f
#ses -i /etc/crontab
#vi /etc/crontab (and delete last line)

Precautions ::  In my case the server was hacked bu Brute-force attack
So set a good password with a combination of upper,lower case letters and special characters.

Post your feedback or any issues you may face removing the virus.  Very less number of good threads are there explaining …