William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

URL rewrite and jQuery Address 1.2

URL rewrite and jQuery Address 1.2

My websites largely use jQuery and AJAX. There are conflict between SEO and AJAX: AJAX just upgrades part/section of the page, while URL keeps remaining.

How to update URL address while using AJAX technology? Like Facebook does.

I found a very helpful jQuery plugin to do so: jQuery Address

According to its introduction, jQuery Address 1.2 is to do URL building while doing Ajax Crawling, and more.

The jQuery Address plugin provides powerful deep linking capabilities and allows the creation of unique virtual addresses that can point to a website section or an application state. It enables a number of important capabilities including:

  • Bookmarking in a browser or social website
  • Sending links via email or instant messenger
  • Finding specific content using the major search engines
  • Utilizing browser history and reload buttons

The following are some examples of jQuery Address:

  1. Crawling
  2. Express
  3. Tabs

The following is extracted from wiki, mention URL mapping and AJAX:

1. URL mapping

A framework’s URL mapping facility is the mechanism by which the framework interprets URLs. Some frameworks, such as Drupal and Django, match the provided URL against pre-determined patterns using regular expressions, while some others use URL Rewriting to translate the provided URL into one that the underlying engine will recognize. Another technique is that of graph traversal such as used by Zope, where a URL is decomposed in steps that traverse an object graph (of models and views).

A URL mapping system that uses pattern matching or URL rewriting allows more “friendly” URLs to be used, increasing the simplicity of the site and allowing for better indexing by search engines. For example, a URL that ends with “/page.cgi?cat=science&topic=physics” could be changed to simply “/page/science/physics”. This makes the URL easier to read and provides search engines with better information about the structural layout of the site. A graph traversal approach also tends to result in the creation of friendly URLs. A shorter URL such as “/page/science” tends to exist by default as that is simply a shorter form of the longer traversal to “/page/science/physics”.

2. Ajax

Ajax, shorthand for “Asynchronous JavaScript and XML“, is a web development technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user requests a change. This is intended to increase the web page’s interactivity, speed, and usability.

Due to the complexity of Ajax programming in Javascript, there are numerous Ajax frameworks that exclusively deal with Ajax support. Some Ajax frameworks are even embedded as a part of larger frameworks. For example, the Prototype JavaScript Framework is included in Ruby on Rails.

With the increased interest in developing “Web 2.0” Rich Media Applications, the complexity of programming directly in Ajax and Javascript has become so apparent that compiler technology has stepped in, to allow developers to code in high-level languages such as Java, Python and Ruby. The first of these compilers was Morfik followed by Google Web Toolkit, with ports to Python and Ruby in the form of Pyjamas and RubyJS following some time after. These compilers and their associated widget set libraries make the development of Rich Media Ajax Applications much more akin to that of developing Desktop applications.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: