Posts Tagged ‘java script’

General introduction-Java script

Wednesday, July 16th, 2008

JavaScript is most commonly used as a client side scripting language. This means that JavaScript code is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it’s up to the browser to do something with it.

The fact that the script is in the HTML page means that your scripts can be seen and copied by whoever views your page. Nonetheless, to my mind this openness is a great advantage, because the flip side is that you can view, study and use any JavaScript you encounter on the WWW.

JavaScript can be used in other contexts than a Web browser. Netscape created server-side JavaScript as a CGI-language that can do roughly the same as Perl or ASP. There is no reason why JavaScript couldn’t be used to write real, complex programs. However, this site exclusively deals with the use of JavaScript in web browsers.

If you don’t have any programming experience at all it’s best to start with some gentle JavaScript examples that teach you the basics. It might be a good idea to buy Negrino & Smith, “JavaScript for the World Wide Web”, 4th edition, Peachpit Press, 2001. It contains some very useful examples and though it doesn’t treat advanced programming tricks, it will certainly help you get started. Of course this site also offers plenty of help.

I can also recommend Jeremy Keith, DOM Scripting: Web Design with JavaScript and the Document Object Model, 1st edition, Friends of Ed, 2005. This, too, is a book that doesn’t delve too deeply into technology, but gives non-programmers such as graphic designers/CSS wizards an excellent overview of the most common uses of JavaScript - as well as the most common problems.

Create Site Map and Google XML Map

Monday, July 14th, 2008

Every website needs a Sitemap big or small. Sitemap should be linked to from every page on your site. A site map will help users and search engine robots find all the important pages on your site with just two clicks. This is especially helpful if your site has a hard-to-crawl navigation menu like java script or images based navigation. For WordPress blogs I recommend downloading this free sitemap generator plugin. You can see example on my sitemap page.

Smaller sites can use second navigation bar in the footer that will act as a small mini site map. This is nothing more than all your important pages as links in the footer.

By submitting a XML Sitemap to a search engine, you are making easier for that engine’s crawlers to crawl and index pages of your site. As Google describes it in this article

“Sitemaps are particularly beneficial when users can’t reach all areas of a website through a browseable interface.”

For regular websites there are many free online xml sitemap generators, just Google it but for your WordPress blog you can use this free Google XML sitemap generator plugin as it will also create Robots.txt file which is the next Free SEO Tip.