Do you need to know Javascript ?


Web site maintenance or development has led to the need for software developers to know and understand how to write or read JavaScript.  The need for professional JavaScript developers is growing at a fast rate.  Now that does not mean there will be college courses dealing with JavaScript 101 but there is a vast amount of on-line knowledge areas for self taught on how to use JavaScript.

The beauty of JavaScript is that you do not need a degree where it is a free technology that requires no installation and no configuration.  You can easily open up a HTML page and quickly write a function to send out the famous “Hello World!”

Hello World Sample



<p>Simple JavaScript</p>

alert( ‘Hello, world!’ );

<p>Not hard ?</p>



As displayed above, the code shows the necessary tags to create a nicely formatted HTML page which will open an alert window to display ‘Hello World’.

Advantages of learning JavaScript

A major advantage to JavaScript is the fact that it is not strictly an interactive programming language but it is platform-independent.  This means you can write the code and insert it on any machine, Android, iOS, iMac, Windows, etc.  The next important thing to take into account is that it is case sensitive which the function HelloWorld is not the same as helloworld. Be very careful about this.

The final advantage of JavaScript is the event loop. When an event is triggered in the browser, JavaScript run-time stores information in the message queue. If a callback function existed with this stored information, it will be executed the next time it is encountered within the loop. The end result is that the application is able to handle multiple operations on a single thread, which grants the developer freedom from additional programming of all the different application states.

To wrap up, it is your best interest to learn JavaScript at least to a very basic level.   It is extremely easy to pick up and use in less than an hour and finally you can not go wrong with mastering JavaScript.


What is a Sitemap ?

A site map (or sitemap) is a list of pages of a web site accessible to crawlers or users. It can be either a document in any form used as a planning tool for Web design, or a Web page that lists the pages on a Web site, typically organized in hierarchical fashion.

Why would you need a sitemap for your web site is usually a reasonable question for any web designer.  A sitemap is a quick access point that allows the visitors on your web site to see the hierarchy of your website and pages in a single glance.   Your web designer tool kits usually provide a method to generate a sitemap from the current set of available pages which will be constantly deleting, editing and changing product, information, static pages.

Let’s try to understand what a sitemap is

A sitemap is a file where you can list the web pages of your site to tell Google and other search engines about the organization of your site content. Search engine web crawlers like Googlebot read this file to more intelligently crawl your site.

Also, your sitemap can provide valuable metadata associated with the pages you list in that sitemap: Metadata is information about a webpage, such as when the page was last updated, how often the page is changed, and the importance of the page relative to other URLs in the site.

So basically the additional information will assist in making your web site a possible hit when folks are searching the internet for particular services or products.

Why do you need a sitemap?

If your site’s pages are properly linked, Google’s web crawlers can usually discover most of your site. Even so, a sitemap can improve the crawling of your site, particularly if your site meets one of the following criteria:

  • Your site is really large. As a result, it’s more likely Google web crawlers might overlook crawling some of your new or recently updated pages.
  • Your site has a large archive of content pages that are isolated or well not linked to each other. If you site pages do not naturally reference each other, you can list them in a sitemap to ensure that Google does not overlook some of your pages.
  • Your site is new and has few external links to it. Googlebot and other web crawlers crawl the web by following links from one page to another. As a result, Google might not discover your pages if no other sites link to them.
  • Your site uses rich media content, is shown in Google News, or uses other sitemaps-compatible annotations. Google can take additional information from sitemaps into account for search, where appropriate.

Here are a few useful tips for sitemap

Updating your sitemap after any revision is performed is a excellent benefit.  A HTML sitemap can easily be considered as a layout of all the pages that your web site has to offer while a XML sitemap specifically aims for search engines as it reflects the most up-to-date information about the last updated pages.  Depending on the web site design you can have plug-ins or the tools auto update / create the sitemap.

Your sitemap can provide valuable metadata associated with the pages you list in that sitemap: Metadata is information about a webpage, such as when the page was last updated, how often the page is changed, and the importance of the page relative to other URLs in the site. (Source: Google support)

Once you have your sitemap ready, you should submit is to search engines like Google, Bing and Yahoo search via their respective webmaster tools. Click here for steps to submit a sitemap to Google Webmaster Tools.


How to fix a WordPress Memory Exhausted error in the Cache.php

Many times a blogger will insert a plugin thinking that everything will be fine and you will see the results immediately but instead after activating the plugin you are shown after logging back into the admin area.

PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 6253909 bytes) in #### on line ### leaving you with no method of getting to the admin area getting only a white screen with this message.

After doing some research the results were 3 simple updates that fixed the problem and brought back the web site.

Step #1 – Make sure you have a FTP account with a username / password to retrieve the necessary files as well as uploading files. If you only have the web hosting control panel you will need to have that username / password and can get the job done by using the file manager.

Step #2 – Open wp-includes/cache.php and enter after

ini_set('memory_limit','32M'); // set memory to prevent fatal error

Save the file and go on to the next step.

Step #3 – Create a .htaccess file for the wp-includes directory and insert the following lines:

# set memory limit for cache.php
php_value memory_limit 32M

Step #4 – The final step is to create a local php.ini file in the same directory (wp-includes) and insert this:

;; set memory limit for cache.php
memory_limit = 32M

That is all you have to do and your blog should be back up working. Always make sure you have backups of your entire WordPress site that includes the Admin – Content – Includes along with the initial set of WordPress files. Finally get a SQL backup from the database that you are using, either MySQL or MS SQL but you need to get a complete backup, download it to a local machine.

Every single time you are doing an update on WordPress the point is to have insurance, a bad plugin or widget can destroy your theme by an out of place tag. Always be on the safe side.