SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Deep linking AJAX

    I'm trying to gather some information on any techniques or even plans to change the fundamental nature of the way the internet and http requests work.

    From both an advertising, and a usability perspective, the concept of a page load is becoming obsolete. Users expect instant results, and advertisers are becoming more concerned with time on site than they are with page views. You don't need a full page view to have an ad impression anyway.

    That said, there are plenty of techniques to make it so that your page can load new information without reloading the whole page. The problem is there doesn't seem to be any good way of making it so that AJAX calls can be linked to.

    My site has a somewhat weak implementation of this:
    http://www.gamereplays.org/starcraft...#/replay_stats

    Notice that it links you to the "APM" tab of that page, and if you click the other tabs they're all loaded via AJAX? You'll probably notice that initially it loaded the "Overview" tab, and after the page loaded, it then switched you to the APM tab. That's wonky behavior, and I don't like it, but there's not much that can be done about it as far as I know.

    The problem is, as far as I know, this deep linking technique becomes increasingly difficult to implement the more variations you have on a page's data. For example, if you have pagination, then you need to make your deep linking code support all those variations as well.

    So my question is, is there a way to easily, FULLY AJAX a website, complete with the ability to deep link to any page state, without any wonky behavior (e.g. loading the "base page" first, and then after it's loaded, switching the data)?

    If not, has anyone heard of any plans to fundamentally rewrite the nature of HTML and HTTP requests so that web pages are no longer based on page loads, but state changes?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,182
    Mentioned
    16 Post(s)
    Tagged
    4 Thread(s)
    A good way to handle such tasks is to development the application using a modular architecture in which in "piece" can be requested/generated as its own "base page" without the wrapper/layout. When an application is developed in that way it is non-trivial to load each "page" dynamically in combination or nested with others.

    The other common technique for tabs is to place all tabs on the page than hide and show using JavaScript. This approach works well for small related yet separate sections of content.

    As for your issue loading interview first the best approach to fix that would be having it load the other tab as HTML first. Some logic would probably need to be reworked but it can be done with current technology. There is nothing stopping you from rewriting the page so that the ATB tab is first selected.
    The only code I hate more than my own is everyone else's.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •