Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts

    Problems with pure AJAX?

    Hi all,

    I am using more and more AJAX in the websites that I build. I wonder what, if any, are the drawbacks of using AJAX as compared to the standard HTTP submit/response method.

  • #2
    Regular Coder Stooshie's Avatar
    Join Date
    Mar 2008
    Location
    Dundee, Scotland
    Posts
    379
    Thanks
    9
    Thanked 39 Times in 39 Posts
    Accessibility is one drawback. Screen readers are not very good at reading content that is dynamically created by client side scripts.

    You can make ajax that degrades gracefully but it can be a lot of work, particularly if you are writing something more along the lines of an online application.
    Regards, Stooshie
    O

  • #3
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    It also breaks the back button, in that if you are using ajax to retrieve all your content, your page will not save state and the user's expected history can become misleading.
    Helping to build a bigger box. - Adam Matthews

  • #4
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Yep, I absolutely *HATE* that with a passion when I encounter it! Especially when I trawl a site for a good half hour or more, eventually find the page I want, fail to notice that the URL hasn't changed, smugly hit CTRL+D - then when I visit the bookmark later - hey presto! ... The homepage of the site. (much purple-faced swearing, flying coffee cups, etc ...)

    I have a rule for my AJAX - use it to modify existing page content (e.g. highlight a password input and generate a javascript alert when the user has entered the wrong password) but if page content needs to be modified a lot (e.g. change of page) then I use the standard HTTP request mechanism to request a fresh page from the server.
    Last edited by mlse; 04-02-2008 at 10:36 AM.

  • #5
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You could use something like Really SImple History for back button support: http://code.google.com/p/reallysimplehistory/

    HTML5 has new tags to also help with this too: http://blogs.pathf.com/agileajax/200...ml5-and-a.html

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • The Following 2 Users Say Thank You to A1ien51 For This Useful Post:

    mlse (04-08-2008), oesxyl (04-03-2008)


  •  

    Posting Permissions

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