'New Discussion' icon remains on the page

Posted on 2008-11-11
Last Modified: 2013-11-19
On the website, there are discussion messages and the user is made aware of new messages through a 'New Discussion' icon next to the link to the Discussion webpage. The user clicks on the icon and proceeds to the discussion webpage which lists all the messages by subject name. The user views the new message by clicking on the message subjects where it then showed in a pop-up window. When the user is finished reading the message, he clicks closes the pop-up window.

Back on the main discussion page, the user still sees the 'New Discussion' icon next to the link to the Discussion webpage. Even when he refreshes the page, he still sees the icon. Even when he navigates to another page in the website, he still sees the icon.

What are some solutions to this problem that I can investigate?
Useful links providing a background on the solution would be helpful.
Question by:kgpretty
    LVL 70

    Accepted Solution

    Hi kgpretty,

    The easiest thing to do is to set a cookie for the user that keeps track of which threads have been checked.  The icon is changed to a dynamic image and a script checks the cookie data to determine whether or not to display the icon.  This method would work without the user being logged in, but has some drawbacks.  One, the user has to accept the cookie and a lot of users block that behavior.  Two, the cookie file can get to be very large if the web site has a lot of active discussion.  Three, if the user clears the cookies, they are back to square one.

    Another method would be to force users to register and login and use a back end database to track what has been visited.  This pretty much eliminates the cookie problems and is not significantly harder to code.

    Author Closing Comment

    Very precise.. exactly what I wanted. Thankyou.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    The viewer will learn how to count occurrences of each item in an array.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now