3

my question is about this website - http://www.bits-apogee.org/2011/

whenever you click on the link in the side navigation bar, the middle part of the website is dynamically loaded. Also, the url also changes, everything else remains unchanged. how is this done?

is this some query plugin?

jacksparrow007
  • 1,298
  • 4
  • 19
  • 30

4 Answers4

1

The site is using Hashes (#) in the URL to denote the new content being loaded.

This is useful for people bookmarking dynamically loaded content (normally hashes load to specific areas on a page, named anchors or ID's for new browsers), because they don't trigger the page to refresh...

http://www.highrankings.com/urls-with-hashtags-307 there are drawback (SEO) concerns to this... however you will notice more and more sites doing it so i would assume the SEO robots will get better.

rlemon
  • 17,518
  • 14
  • 92
  • 123
  • 1
    For Google, add an ! sign right after your hash tag ;). See also here: https://developers.google.com/webmasters/ajax-crawling/docs/getting-started . – Styxxy May 08 '12 at 20:27
1

I totally agree with @JMCCreative. It looks like it's an actual refresh. You should look at the following post on StackOverflow.

Modify the URL without reloading the page

Community
  • 1
  • 1
Yosep Kim
  • 2,931
  • 22
  • 23
  • look at the URI of a subpage `http://www.bits-apogee.org/2011/#Automation/Circuit_Design_Challenge/` everything after the hash is converted into a variable then that relative path is loaded via XHR – rlemon May 08 '12 at 20:24
1

There are 2 possibilities:

If you use jQuery, you can use the handy plug-in jQuery Address. This will take care of both above cases.

Community
  • 1
  • 1
Styxxy
  • 7,462
  • 3
  • 40
  • 45
0

They're not using a plugin. They're doing an ajax request to a URL like this: http://www.bits-apogee.org/2011/getcontent/?even=Rachel+Armstrong and dumping the overview in the container.


The circle of this type of process is usually like this:

  1. listen for link clicks
  2. on click, prevent default on event.
  3. user window.history.pushState to update url
  4. some other code - hears new history
  5. generates a url to get the content.
  6. ajax load the url
  7. dump the data into a container

2 Libraries I have used, both are easier than the above, as they rely on loading a regular html page via AJAX instead the example site you point to, which used a JSON format to get the data.

  • Pjax - update peices of the page, by pulling that HTML node from a different URL.
  • Ajaxify - easiest solution, you could do that effect on an HTML site in 10 minutes.
LessQuesar
  • 3,123
  • 1
  • 21
  • 29