How to make your website to load faster

 

If you have a website that loads too slowly, potential visitors and even customers will simply give up and click away. Google considers site speed as one factor in its search ranking algorithms.

You can use this tool to determine what is the load up for your website or blog.

Too much flash graphic.

Avoid overdoing graphics or flash works in your homepage. Adding flash animation to websites gives them a more interactive appearance. But, they can equally slow down your overall loading speed. Instead opt on using programming scripts that give the same interactive look to your website. Use graphics only where it is absolutely required in your your website.

Move JavaScript and CSS Into External Files.

If your pages have lot of Javascript code, move all the code to a separate external file that would load just once.
Browser will cache CSS and JavaScript and re-use them when visitor goes to other pages. This way you don’t have to load the same CSS and JavaScript code in every page.

Reduce the size of your images files.

One easy way to cut the size of your images is to crop them. Trimming off unnecessary parts of the picture can lower the file size without lowering its quality. Another great way to reduce the file size is to convert to a lower
resolution. Reduce high resolution pictures to 72 dpi, the standard resolution for images on the Web.

Keep your code simple and clean.

Browsers love simple and neat looking codes. The main reason being that they are very easy to read and hence take very minimal time to load.

Cache it.

Enable PHP caching. This will instruct the browser to load the website once and then store away the images and everything else for later retrieval. This way there’s only one time that the visitor has to wait for the Internet to produce the images.

Define image height and width with tags.

Height and width tags tell the browser exactly how large the image will be, so it can load other elements of the page while the image loads. If you do not define the image size, the browser must wait for the image to load before it can load the text.

Use CSS For Faster Pages.

Even if you decide to use tables, CSS can greatly improve your web sites load time! With your styles in an external .css file, the browser can cache all the formatting and stylizing for your pages instead of having to read each and every single tag all over again. Also it cuts down on long drawn out tags and replaces them with smaller class styles instead.

Your Website Host (bandwidth).

Even your web host can play a part in how fast your website loads.

 

There are other ways to make your site load faster which will improve your rankings on search engine result pages.

DiggDeliciousLinkedInRedditStumbleUponShare

How to create your unique favicon.ico

 

What is a favicon.ico?

A favicon  is that small icon displayed on the browser URL bar, on the bookmark lists and, for certain browsers, on the navigation tabs. While a favicon will not drastically change your traffic it will certainly improve the look of your Website and SEO.

The process of creating and adding to your website is very easy.

1. A Favicon is no more than a 16 by 16 pixel icon. You can use Photoshop to create one.  The best way is to search the web for a Favicon Generator. There are plenty of those sites available for free.

2.  Upload the generated file (“favicon.ico”) to your site.(make sure you place it in the root directory, which is the directory where the index file is located).

3.  Place the following code within the <HEAD> tags of each page:

<link rel=”shortcut icon” type=”image/x-icon” href=”/favicon.ico”>

 

That’s it. You now have your very own Favorites Icon.

 

 

 

 

DiggDeliciousLinkedInRedditStumbleUponShare

How to Redirect a Web Page

 

What is a Redirect?

  301 redirect is the most efficient and Search Engine Friendly method for webpage redirection.

301 Redirect

Anytime you move a page, or change the URL that is used to access a specific page or set of pages, you need to setup a 301 Redirect.

The 301 status tells the browser that the page has been moved permanentlyThis is extremely important to search engines, 301 redirects are a critical step in ensuring your website is search engine friendly.

One of the trickiest things to avoid when continuing to build your site is the duplicate content pages. Having two pages that are essentially identical does not hurt your website from a visitor standpoint, it can be see by Google as spam. Google recommends using a 301 redirect.

 

Setting Up a 301 Redirect

Properly setting up a redirect can be very easy to do if you have a small site or simple redirection. If you have a large website or are changing the way you link to your pages, setting up a redirection can be complicated.

The examples listed here assume that you are running on an Apache webserver. If your website is running on a Windows platform, you should contact your webhost to figure out how to setup a 301 redirect.

 .htaccess file

The htaccess file is a configuration file where  redirections take place, which is used on Apache based web servers to control many features of the server. It is always listed as .htaccess (with the period in front).You can find a great tutorial on the .htaccess file over at Javascriptkit.

 Moving a Page

If you are  moving a page or a directory from one place to another, setting up a redirect is relatively easy to do. Open up your .htaccess file (or create a new file that you will call .htaccess) and paste in the following line:

Redirect 301 page.html http://www.domain.com/newlocation.html

In the above line all you need to do is replace the ‘page.html’ with the page or directory that is being moved and replace the ‘http.://www.domain.com/newlocation.html’ with the location of the new file. That’s all there is to it! A search engine spider will now know that if it tries to access page.html, it should update its listing to the new location given.

This could also work for changing your domains as well. If you are changing domains, you would write:

Redirect 301 / http.://newdomain.com/

Please REPLACE www.newdomain.com  with your actual domain name.

Redirect Old domain to New domain

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com  with your actual domain name.

You Are Changing from HTML to PHP or ASP

As technology improves, so should our websites. This often requires that we change the technology that runs our websites. Many websites started out as plain HTML but later find the need to move to PHP or ASP to give their users the best experience possible.

There are a few options availabe in this situation. The solution we will offer is using a technology called mod_rewrite. Mod_rewrite is a simple technology that is used to rewrite URLs at the server level. Sound confusing? It really is not too difficult to understand. Simply put, mod_rewrite can make this url:

http.://www.domain.com/page.php?id=222&action=new

accessible to your users by linking to:

http.://www.domain.com/222/new/

You do not have to change your files around at all, just create a rule.

 

Using PHP and ASP to Redirect

For those users who are drastically changing their website’s structure, they may find that using mod_rewrite or a simple apache redirect just does not cover all their bases. An example of this could be a blog owner who decides to change the links to their posts from this:

http.://www.blog.com/archives/20010/8/9/

To this:

http.://www.blog.com/archives/my-post-title

It would be unrealistic to try and enter a redirect rule for every post that this person has made in the past, and the URL’s do not share any of the same information, which makes it impossible to use mod_rewrite alone. In a case like this, it is necessary to fall back on a script that will take the old URL, feed it to a script which in turn will provide the official redirection.

Both ASP and PHP have the ability to provide a 301 redirect to browsers. To redirect a browser or spider with PHP or ASP, you should use the following code:


PHP Redirect

<?
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: http://www.newdomain.com/newdir/newpage.htm’);
exit();
?>

Please REPLACE www.newdomain.com  with your actual domain name.

ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”, “http://www.newdomain.com/newdir/newpage.asp”
%>

Please REPLACE www.newdomain.com  with your actual domain name.

ASP.NET Redirect
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://www.new-url.com”);
}
</script>

ColdFusion Redirect
<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.new-url.com”>

Redirect to www 

Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc].

Please REPLACE www.domain.com  with your actual domain name.

If you find yourself in this situation and are not familiar with programming, you should hire one to do this for you.

 

DiggDeliciousLinkedInRedditStumbleUponShare