Dec 16, 2009

The noscript tag

BLOGGER UPDATE:
Hey guys, I wanted to update everyone on the blogger bug that was making the comments count incorrect. They fixed it!!! I don't know what was done, but the comments have been accurate for the past week now, and I've been closely monitoring everytime I make a new comment and the numbers are all correct! This means no counting by hand! I hope everyone can make use of my application and if not, that's fine, but I know it has saved some people a lot of time. It kind of just became a challenge for me to do at one point. I started doing it, thinking it'd be cool, then I hit those problems and it became something I needed to figure out! lol

Anyway, the reason I'm posting is to talk about the noscript tag. The noscript tag is a tag used in HTML when JavaScript is disabled or not supported by a browser. This tag is very important in our class because everything we're dealing with is AJAX, so it's all JavaScript-based! If a user visits one of our AJAX-based sites without JavaScript enabled on their browser or with a browser that doesn't support JavaScript, they will not get any results. All the visitor would see on our sites would be the static information within the HTML. Obviously for sites like ours that are developed 100% around the use of AJAX, our sites pretty much become useless then. This is where the noscript tag comes into play.


The noscript tag allows the browser to display alternate information when/if JavaScript isn't enabled/supported. Using the noscript tag is extremely simple. All you need to do is type . Unfortunately, if JavaScript is disabled/unsupported on our sites, the noscript tag still won't give the results we want, but it will at least inform the user that they need to either enable JavaScript or find a browser that supports it if they want to experience the full effect and purpose of our AJAX-based websites.

The majority of the time, the text you place between the noscript tag is what determines whether or not a visitor stays at your site, or just gives up and goes somewhere else. A few important points you may want to consider in the noscript tag are to try and type as much relevant content as you can related to the thing the user is trying to view (in the case of this class, that would mean listing some sort of related information to the API the JavaScript is attempting to access) and telling the user that JavaScript is necessary to properly view this site. Sometimes it's a good idea to give short instructions to the user on how to enable JavaScript on a few popular browsers in case they aren't aware it's disabled and don't know how to re-enable it.

7 comments:

  1. Hey Matt I just wanted to thank you for the blog and comments count. It really helped a lot and saved me time and headache.

    ReplyDelete
  2. Hey Matt, I want to thank you as well, for the hard work and making our lives easier.
    Thank You

    ReplyDelete
  3. Hi Matt, this is another helpful post, thanks! I would love to see it in action and will have to look at it closer down the road. I concur with everyone else, thanks so much for your effort on the blog counts. It was a time saver and hopefully can be used by future classes. We were lucky to have you in our class!

    ReplyDelete
  4. Matt, FYI, I just noticed that when the counter went to zero for comments it read, "Your Comments:
    You haven't made any comments so far...Get crackin!!" but I realize I had met the requirement. An enhancement? Thanks again!

    ReplyDelete
  5. Matt, you truly deserve a huge THANKS for all the hard work you have done to make sure that the program you created was counting correctly. To count all of the posts and blogs by hand would have been horrific! Thanks again! :)

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Well I'm glad I could help everybody out with my counter application. Your thanks for it is greatly appreciated!

    Diane, I don't see what you mean...If somebody has made zero comments it will indeed say something like that, but I'm pretty sure everybody in our class has made at least one comment! :) When I click your name it shows you have made 43. You're good to go!

    ReplyDelete