Post under AJAX, Javascript | By LGR | On May 28th, 2008
The title does not do this post justice, but perhaps that is becuase only web developers will get excited about this. One of the things about creating websites using AJAX is the size of the Javascript frameworks that need to be loaded into the site so the user can use the website. Sure you can speed up your website with GZIP compression and send the Javascript frameworks compressed and once the user has them they will be fine as long as they stay on your website. Unfortunately users don’t just use your website. They move on to another great AJAX enabled website and have to download the same Javascrpt frameworks all over again.
To make the user experience better for users all around the globe it would be great if the Javascript frameworks could be called from one central location and then it would be cached by the users browser and every visit to every website that uses that Javascript framework would be made faster. To make this possible Google has started to host five Javascript frameworks to help speed up access to your favourite websites. The five Javascript frameworks that Google is hosting include:
This could dramatically improve end user experiences on AJAX enabled websites. It can also save on bandwidth and improve load times for websites all around the world. Think about how much faster your favourite WordPress blogs will load if they are all loading the prototype framework from Google instead of your web browser downloading a new version on every blog. If you are interested in using the Javascript frameworks that Google is hosting take a look at the AJAX Libraries Developer’s Guide for more information about how to load the frameworks into your websites. I know I will be looking at some clients websites and evaluating if they can use this service from Google. It could improve load times and make the websites react faster for users.
Post under AJAX, Web Programming | By LGR | On February 22nd, 2007
I have been working on a website that uses Ajax calls to dynamically load content into the same page with out refreshing. One of the reasons Ajax was chosen was to create a user experience similar to a flash website. The site appears very smooth, and is as close to a flash site that I have ever built.
As I was building the site I actually started off building the pages as I normally would, as individual pages that linked together. I had the whole site working as a regular website before adding in any Ajax. What I discovered as I added in the Ajax and started browsing the site was the site was still accessible to users without javascript turned on. This also means that the whole site is also accessible and readable by the search engine spiders. This was fantastic news, since one of the downsides of using Ajax is that the search engines do not index the content that is loaded through the Ajax calls.
When I realized what I did I was certain I was not the first to discover this, so I did some searching and discovered all about Hijaxing. There are several elements that I discovered are key to Hijaxing a website.
- Plan to use Ajax on your website from the beginning.
- Build your site without Ajax. By building your website without Ajax at the beginning you will create the links just like you are building any other website. You will also remember to do any server side error checking that you might otherwise forget.
- Once the website is complete and functional without Ajax add in your Ajax calls and javascript to dynamically load your content.
It is important to use javascript event handlers to hijack the regular browser request and simply return false when it completes to stop the browser from completing the normal browser request. For example, a link to a new page might look like this: <a href="new-page.html" onclick="do_ajax(); return false;">New Page</a> Here the browser will carry out the Ajax function specified in the onclick event handler, and because false is returned the browser will not actually follow the link to a new page.
Hijaxing makes the creation of Ajax enabled sites more attractive since the sites will still be accessible by users browsing with javascript turned off or with text based browsers (they do still exist). It also benefits a websites search engine marketing by allowing it to be indexed and having more than the index page included in the search engine results pages.
Post under AJAX, Google | By LGR | On February 22nd, 2007
I was reminded today when I visited the Google Adsense blog that Google has some interesting wizards that you can use to add ajax addons on your website. The Adsense blog was talking about a news bar, but there is also map search, video bar, video search, and book bar wizards.
The news bar wizard offers some possibilities to offer your regular readers the latest news about the topics you choose. For example if your website was about golfing, you can set the news bar to just display the latest news about golf. This should help deliver information that will be useful for your visitors,
These addons will do little to help your placement in the search engines, but they can be useful for your visitors. The map wizard, for example, is the easiest way to generate a Google Map to add to a website.
Post under AJAX, Web Programming | By LGR | On February 13th, 2007
Looking for a quick and easy way to add some new zing to your website without a lot of fuss. Here are my top five Ajax add ons to bring some new life to your website. The list is in order of how difficult I think it is to implement on a website, with one being the easiest and five the hardest.
- Lightbox
If you use photos on your website, have a small photo gallery or just want to highlight some special photos then Lightbox is a great easy addition to any site. The install is a very simple four steps.
- Thickbox
If you want to add more to your site than what Lightbox can offer check out Thickbox. It offers more features including the ability to show single images, multiple images, inline content, iframe content and content served through AJAX. While a little more work to install, it can offer more possibilities than just a Lightbox install. I have even seen it used to pop up a Google Map on the page. A very nice package to add on.
- moo.fx
moo.fx is an easy way to add effects to a website. When I used this on a site I found the Idiot’s Guide to moo.fx very helpful in getting me going.
- Google Maps
Google Maps are everywhere! They are easy to include into a site and can provide users with easy access to finding your office. Combine Google Maps with Thickbox and you have a fabulous Ajax add on.
- Rico
This Ajax add on is for those that want to give their website a real make over. The possibilities are almost endless with Rico and what you can do. The simple things that you can do include adding animation effects and rounded corners.
That is my top five that I have experience with, but certainly not an exhaustive list of possibilities. You sometimes just have to pick the tools you will use otherwise you will be switching things constantly and never getting to the other things that need attention.
Comments