An intersting discussion about webdesign
Kim Schulz, monday d. 9. october 2006AJAX is not to be used everywhere. Some places are better left without it.
Today I had a really interesting discussion with one of the visitors of this site, Eric, about everything from the Webdesign, over Ajax and to the Digg effect.
I guess that could just as well post some of the highlights here, since they could be interesting for others as well.
First stop: Webdesign and Ajax.
The design on this site is kinda different which Eric pointed out to me. He liked the idea of me having the small [x] for going back to the frontpage - kinda like a generic back button.
I guess this idea is not new, but to me this was kind of an obvious solution for getting out of a sub page and back to the frontpage. This mainly due to the fact that I in the beginning did not have the "Index" link in front of the page title (above here). This was added later.
Besides the back button I also have the smal / button which takes you to the top. This one actually gave me a bit of problems, since firefox (yep for once this great browser had a problem) cannot handle scrolling a scrollable div to an "a name" tag. Since this is the way I would normally do this, and this actually worked in IE, I had to find a way to do this in Firefox. The solution was a simple javascript hack that looks like:
document.getElementById('content').scrollTop=0
Basically take the content div and scroll it to the top.
Eric wondered why I did not use AJAX (Asyncronious Javascript And XML for newcomers) for this side.
So lets break it down to the places where this could actually be used (reasticly):
Page contents:
- Pros:
- Site would load without flickering and would feel more responsive.
- Cons:
- The browser back button would not work (could be mad possible)
- it is harder to make real permanent links to subpages.
- Browsers wont cache the contents
- there is really no need for it.
Blog items:
- Pros:
- Would be cool to have live updated blog-posts
- would make it possible for the visitor to set how many posts to see
- Cons:
- I dont post enough to have live blog updates.
- there is really no need for it.
Blog comments:
- Pros:
- comments could be updated live
- posts could be send without reloading page.
- Cons:
- people without javascript enabled could have problems posting and seeing my comments (this is less than 1% of the visitors).
As you can see, there is not really anywhere except fo the blog comments, where AJAX would be suitable and needed. I will actually consider adding this at some point later when I can find the time.
Now I know that people will probably start telling me that there is workarounds for all of the cons I have mentioned above - I know, I know - but have you considered that "workaround" is actually a synonym for "hack". In other words: it is not a streight forward implementation, hence probably not the smartest way to do it.
Finally we talked about the "digg effect". Does any actually know how much traffic/hits/etc a normal site hit by the digg effect gets? I wonder if this server can take it. Currently this page is getting an avg. of 19.000 hits/hour (not visits! hits), most of which is for the more traffic-heavy swf files used in the google widgets.
Permanent url: http://www.schulz.dk/en/blog/blogarchive/60
Want your own image next to your comment? Join Gravatar.com - it's free!