Skip to main content

Showing Notifications with HTML5/Webkit

Most of us use popular twitter clients such as TweetDeck, Seesmic which are developed using Adobe AIR. One thing  I like about these clients is that they show notifications when the application is in the minimized mode. Now with browsers implementing webkit such as Google chrome one can use the notification API to send notification to the browser. In this blog post I will be explaining how one can implement webkit notifications in their web application. 

Before we get started with creating notifications we need to check whether the Browser supports the Notification API. This is a simple:

    //your browser supports Notifications
    //switch to other browser that support Notifications

The next step would be to get user permissions to show notifications from the website:
if (window.webkitNotifications.checkPermission() == 0) {
    //show notification code
else {
    //request for permission and then show notification code
The checkPermission method returns '0' if the website has granted permission to show notifications and returns '1' otherwise. The requestPermission method requests the user to provide permission to show notifications. Once the user has provided the permission the next step would be to show the notification to the user:
showMessageAsNotification = function() {

The createNotification method used here displays the notification to the user on the bottom right corner of the screen. For example when the user clicks on a button he will shown a notification with a welcome message:

The notification shown contains a picture, title as 'Sagar' and the message 'Welcome'. It also provides information such as the website from which the notification is shown and an option to Dismiss the message. The options button allows user to disable notifications from the website.
Strictly speaking this is not a part of HTML5 specification rather it is a webkit feature. Therefore this may work only with browsers implementing webkit. 


  1. eh? is this really part of HTML5 or just something that works only on webkit-based browser??

  2. Yes Henry, you are right. I have updated my blog.

  3. I have read many of your post and this post is wonderful.... all of your post are just awesome. Get marketing assignment help in uk.

  4. I am an academic writer at Sample Assignment. I have gone through this piece of writing; it is quite interesting and informative as well. Well, we all know that Sample Assignment is a brand in the field of education. Generally, it helps out the students in their academic in the form of providing assignment help, assignment samples, live sessions, expert consultation etc. If you want to check for sample assignment reviews visit our website. It was incorporated in the year 2009 and since then it has been continuously assisting students in completing their assignment. It works with professional's writers who have adequate knowledge about how to deal with assignments. Also, they have years of experience as assignment provider. All our writers have worked for more than thousands of assignment papers which have helped them in understanding the importance and requirement of the assignment. Get cheap assignment help Australia from us at best price.


  5. This very blog is really interesting and besides diverting. I have chosen a lot of interesting stuff out of it. I ad love to visit it again and again. thank you for sharing such an interesting blog with us!

    Phone Cleaner for Android

  6. Order now for Australian assignment help by assignment experts who are always ready to serve you with every kind of paper writing service. The writer assigned for academic help are subject-specific and have expertise in providing the work to the students come diverse of universities. Visit AllAssignmentHelp for round the clock academic services.

  7. Download HD Bollywood, Hollywood, Tamil Movies on Khatrimaza. Get Instant 1080P movies with clear pixcels, 720P mp3movies on

  8. I am a freelancer and have been helping a lot of students in providing assistance to students who frequently gets worried about their assessment tasks and went online to search for assignment help service terms.
    We at My Assignment Services have potentially recognized the need way back and started what we are an enlarged version of then. With many assignment helper companies in the market, no one has quite able to match the standard that we follow. We give utmost priority to students by strictly adhering to the assignment requirements as well as marking rubrics to score high grades. Our programming assignment help writers are well-proficient in not only comprehending your assessment tasks but also to give an expert finish to it.
    Provided a well-written assignment suitable to your needs, your search for professional essay writers will now end with My Assignment Services. You just have to visit our website for more information.

  9. According to experts, Java Homework Help can prove to be very helpful for developing communication skills. The most popular is the assignment provided by a team of experts.

  10. When it comes to your career prospects and bright future, Assignment Help takes the onus on itself to promote your growth in the right direction. So, that way you wouldn’t have to think twice before trusting us with your academic papers. Place an order with us now and reap the rewards of brilliantly written academic papers today. My CDR Report Writer, one of the leading academic solution providers in Australia, understands the challenges and extends a helping hand to the aspiring engineers who are willing to land a job in Australia.
    Online Assignment Help Australia
    Assignment Help Sydney
    Assignment Help Melbourne
    My CDR Report Writer
    Dissertation Writing Services UK
    Programming Coding Help

  11. Great Read! One of the best guest blog website Simply Cleaver

  12. You just need to call them or sign in to their site. There you have to set up all the task subtleties and they will give you an elegantly composed and well-organized review. These administrations are pocket-accommodating as well as ecstasy for understudies attempting to finish their assignments on schedule.
    my assignment help
    Nursing assignment help

  13. Dear Author, Thanks for sharing the useful and informative information. I am regularly reading your blog articles and its much impressive. I am also a blogger, writing reviews on different - different websites, apps, products and other more. If you want to read my reviews on websites and products, please check somme examples as: Bolly4u HD Movies Download
    Movies4u HD Movies Download
    9xmovies HD Movies Download
    Way2sms Free SMS
    Downloadhub HD Movies Download
    WorldFree4u HD Movies Download
    FilmyZilla HD Movies Download

  14. I am a freelancer and have been helping a lot of students in providing assistance to students who frequently gets worried about their assessment tasks and went online to search for Australian Assignment Help terms.
    We at My Assignment Services have potentially recognized the need way back and started what we are an enlarged version of then. With many assignment helper companies in the market, no one has quite able to match the standard that we follow. We give utmost priority to students by strictly adhering to the assignment requirements as well as marking rubrics to score high grades. Our resume writing services writers are well-proficient in not only comprehending your assessment tasks but also to give an expert finish to it.
    Provided a well-written assignment suitable to your needs, your search for myob assignment help will now end with My Assignment Services. You just have to visit our website for more information.

  15. Really good article. Thanks Cyrus but will that apply in the future?
    game of thrones
    stranger things

  16. This is a wonderful post. Thanks for sharing visit at Top seo agency 2019

  17. dalam bermain poker online harus terpercaya dan bisa mendapatkan keuntungan yang besar seperti pokerseleb situs poker online uang asli banyak bonusnya

  18. Hello,this is an awesome post thanks for sharing.It is relay enjoy to read this post.
    writing a personal statement

  19. that spread among family members, you should contact a company specialized in the field of pest control in the best way with the use of the strongest insecticides safe for health and officially authorized The Ministry of Health, where the insect control company in Dammam to work on the highest efficiency and the fullestشركة مكافحة النمل الابيض بخميس مشيط
    شركة مكافحة حشرات بخميس مشيط
    شركة رش مبيدات بخميس مشيط
    ارخص شركة مكافحة حشرات

  20. Thanks For Sharing your valuable content!!!!!

    Every man in this world has a thirst for lust. Agreed or not? Well, it can only be satisfied with extreme sexual pleasure. So sex dolls have become one of the hot topics in society today. There is no doubt that these erotic beauties have been a source of fulfilling even the wildest fantasies in no time. Since there are different types of love dolls available in the market, so it is vital for the buyer to choose the right and beautiful cheap sex doll. So for more information click in this link.

  21. Thanks for your sharing! The information your share is very useful to me and many people are looking for them just like me!
    First grade NJ is helpful to get the basic knowledge for your kid so that they can more about it. Thus, preschool education NJ compulsory for every toddler. So are looking Preschool Near Edison? Then Igostem Academy one of the best starting school for your kids. Consult us today!

    toddler new jersey
    summer camp NJ
    PreSchool New Jersey
    summer camp
    preschool classes NJ

  22. Get the outstanding sna level 5 assignments examples at an affordable price from Ireland assignment help. our expert assignment helpers are available 24*7 for help students. we offer various complimentary assignment help services to all students of Ireland.

  23. pokerseleb Situs Poker Online Terpercaya dan IDN Poker Uang Asli yang menyadiakan berbagai fasilitas dan permainan poker yang bisa anda mainkan dengan modal 10 ribu saja anda juga berkempatan mendapatkan jackpot senilai 850 juta rupiah di pokerseleb.

  24. when you want to check the live train status updates get here

  25. Occurring problem in writing an assignment. Our experts writers and ready to give the solution for your problem. Our experts are ready to write your assignment perfectly. We have 10+ years of experience in writing. NZ Assignment Help are giving instant services for all the students.

  26. Hire our expert for writing your human resources assignment. UAE Assignment Help have a huge team of 1000+ writers and we are giving top-quality highly researched content for all the assignment help. Our writers have 10+ years of experience and we are giving 100% privacy for your human resources assignment.

  27. In case your HP printer driver setup does not work properly, then you must surf on As pr your need and compatibility key attribute, you can get compatible for getting the suitable result. For knowing more information, you can surf our website.

  28. assignment help online is the online administration where students can get full learning in any scholastic session. The points are performed by the prerequisite of students as it were.
    mathematics assignment help

  29. We are a reliable third party technical support service provider, offering online technical support services for brother printer users. If you’re experiencing difficulties related to
    brother printer wifi setup, our printer technicians are very trained to solve this error simply.

  30. When i read your blog i get some knowledge to read this post thanks for sharing this post.
    house cleaning
    move out cleaning

  31. I suggest all members choose assignment help Australia for the best guideline in your academia. The perfect and expert assistant your requirement and learning assignment project by the university.

  32. We offers to the students by the help of its expert assignment writers. If you need any college level Assignment Help at prime quality with better work. Kindly visit All Assignment Help.
    Masters Dissertation Help
    Master Thesis Help

  33. Singapore Translation Services is one of the finest translation company in Singapore and abroad. If you are looking for business translation help then you must come with us. Singapore has a community of professional human translators in 100+ languages. We provide human only translation on our platform.

  34. Great and awesome blog thank you for sharing..I just want to say that all the information you have given here is wonderful.Thank you very much for this one. And i hope this will be useful for everyone.
    Best Assignment Help

  35. ABC Assignment Help is an incomparable online Engineering assignment help company delivering excellent academic assignments, essays, coursework and reports. Through a team of over 3000 subject experts we ensure individual attention to every student making the assignment help experience completely personalized in nature. With our round the clock services, you can be assured of high grades every time.

  36. We provides the outstanding assignments writing help to students of top universities with the standard quality at low cost. we have the best team of assignment experts who are proficient in assignments completion at any level so, students can get higher marks in their academics.

  37. Very knowledgeable Blog! This Blog is Totally Informative About writing service. If You Are Looking For The java Assignment help serveice Provider then You Should Definitely Go For

  38. My Assignment Help is an exceptional online assignment help providing adept Engineering assignment help in Australia. We offer unsurpassable assignment solutions in various areas of engineering through a team of Ph.D. certified tutors having proficiency and knowledge in meeting University guidelines ensuring high score in every assignment, essay, coursework and dissertation writing task.


  39. Want to grow your business and become to brand in a complex online market place globally? Try our E-Commerce web development services, I am sure, you will be 100% satisfied. PNJ Sharptech is a Website development company in India that offers a full range of web application services like custom software development service, application modernization services. We believe that an effective web application is a consequence of a strong and concrete marketing strategy.

  40. The homework help to the students at a reasonable price provided by the expert homework writers at Here we provided the best homework help to all students as we have the prominent team of professional and well-qualified professors who are helpful for the students to complete their homework assignments without missing the deadline.

  41. Our subject specialists have numerous long periods of showing background and complete learning to compose top quality assignments according to student's requests and due date.
    Accounting Assignments Online
    Digital marketing assignment writing

  42. Good Post! Thank you so much for sharing this pretty post,
    it was so good to read and useful to improve my
    knowledge as updated one.
    jio phone me movie kaise download kareone.

  43. Good Post! Thank you so much for sharing this pretty post,
    it was so good to read and useful to improve my
    knowledge as updated one.
    tricksinfo !one.

  44. If you are a student from canada and you are in search of the best assignment service provider then you will find the best platform here. Assignment Help Here is the link just have it and grab it. They serve more services like assignment help, java assignment help and many more with the affordable price. So just have a look on this website and you will thank them.

  45. B2B travel portal is usually an online travel-booking engine for travel agents.It is a system giving end-users to booking flights, hotels booking. Teamindia Webdesign is one of the best leading B2B Travel Portal Development company enabling our clients to serve their customers efficiently, with affordable rates.

  46. Assignment help Hong Kongreflects inexpensive academic writing for Hong Kong students to finish their assignment without any hindrance. Find experienced academic writer via Assignment help and complete your work within deadlines.
    Assignment help Saudi Arabia
    assignment help Kuwait
    assignment help United Arab Emirates

  47. This is one of the best post and I really liked this post. I will recommend that we should share such kind of posts so that every person can get important information. Thanks for sharing this one. Assignment writing services.

  48. Searching for Bill Payment API in India? Pay My Recharge gives you the best services for all local as well as international customers. We are giving high commission rates for all the transaction done with our API solutions. Our team is highly professional and we are working from past 10+ years in Recharge business.


Post a Comment

Popular posts from this blog

A cheat sheet of keyboard shortcuts in ColdFusion Builder

In my last post I have explained about keyboard shortcuts in ColdFusion Builder 2.0. This blog post contains a list of all shortcut keys and I have listed these keyboard shortcuts based on the categories that it falls into. Well, this post was not planned since users can easily get to know the keyboard shortcuts by navigating to the preferences (ColdFusion -> Profiles -> Keys). However, I met Joshua at Scotch on the rocks in Edinburgh and he suggested that it would be nice to have the list of keyboard shortcuts handy. So this post is for those who would like to have the list with them and refer it whenever required.

Keyboard shortcuts for inserting text:

These are the keyboard shortcuts which are used to insert some text into the editor:

CommandKeyboard shortcuts on WindowsKeyboard shortcuts on MacInsert anchor tagCTRL + T, LCMD + T, LInsert bold tagCTRL + T, BCMD + T, BInsert br tagCTRL + T, RCMD + T, RInsert cfabortCTRL + T, ACMD + T, AInsert cfdumpCTRL + T, DCMD + T, DInsert cfs…

Custom validation messages for HTML5 Input elements using the constraint validation API

HTML5 has introduced several input types such as EMAIL, URL, RANGE, SEARCH, DATE, TIME, etc,. Most of the modern browsers have implemented them and are ready to be used in a HTML document. Another exciting feature introduced in HTML5 is the form validation. Instead of writing JavaScript to validate users input, browsers can now validate it and show an appropriate message if the validation fails. The validation message is shown in line with the field for which the validation has failed. The default error message is shown when the validation fails. In this post I'll explain how these error messages can be changed.

De-obfuscating javascript code in Chrome Developer Tools

I had blogged about JavaScript debugging with Chrome Developer Tools some time back, wherein I have explained how these developer tools can help in debugging javascript code. Today Google Chrome 12 was released and my Chrome browser was updated to this version. As with every release, there have been some improvements made on performance, usability etc,. One feature that stood out for me is the ability to De-obfuscate the javascript code.

What is Minification?

Minification is the process of removing unnecessary characters such as white spaces, comments, new lines from the source code. These otherwise would be added to make the code more readable. Minifying the source code helps in reducing the file size and thereby reducing the time taken to download the file. This is the reason why most of the popular javascript libraries such as jQuery are minified. A minified jQuery file is of 31 KB in size where as an uncompressed one is about 229 KB. Unfortunately, debugging minified javascript file…