views:

257

answers:

3

I would like to create a similar effect to Apple's Safari 4 Beta Top Sites page - http://farm4.static.flickr.com/3644/3323438140_10b62d40f4.jpg ; when when you view it and a page's content has changed since you last visited, it displays a blue star in the top right hand corner to notify you.

I would like to do the very same, but only within my website and instead of an image I would like to append a '*' or some other character to the menu item's link.

I'm sure you would use the jQuery Cookie Plugin, but my scripting is not that advanced and I do not know how to dynamically change the cookie's content. Have I explained properly? How would I do it?

Many thanks in advance

+1  A: 

You're asking a very vague question. Have you even attempted this? Please try it first then ask for help along the way.

Also, this is not something you necessarily need jQuery for. You could do it completely on the backend. But it's hard to say which solution is best for you without know anymore details.

Matt
A: 

I guess I would recommend using php and storing the cached page into a db (in other words the user would have a "fav pages" account) then when the user visits the "fav pages" webpage, you would fetch all the users favorite pages and compare it to what has been stored in the db. But for certain pages (for example if they have a date/time string), it would be very difficult to tell if the change was something the user wants to know about. Probably you would need to create a complex algorithm to decide what change is good change and what change is just certain website features.

Samuel
+1  A: 

Server side:

Read the website f.ex every minute and save the timestamp if changed content. Save the users' visit timestamp to the page

Ajax:

Check if the websites update timestamp is newer than your visitors' timestamp, if yes make the star class visible, when the user clicks on the link, make the star disappear and update the users timestamp.

--

Showing a star or an image or whatever with Jquery is not the big deal here, it's a oneliner, the complex problem is to detect website changes, because minor changes can occur, but the main content could not change. The easiest way to do this would be if the website provides rss, then there's probable that the important new content will be published via rss.

zalew