Custom JSP taglib lets you create invisible HTML tag with timestamp. Lets you create inline cache.
You can analyze time stamps in JavaScript code, compare value with time stamps provided via cookies and change content
(via JavaScript's DOM manipulation) right on client side. For example:
<%@ taglib uri="taglib.tld" prefix="t" %> <t:TimeStamp/> and you will get some like this: <time datetime='1314808158031' style='display:none'/> So, in your JavaScript code you can do some like this (jQuery based code): $("some_block").each(function() { var article = $(this); var articleDate = article.find('time').first().attr("datetime"); var lastVisit = getTimeStampFromCokies(); // remove outdated blocks if(articleDate < lastVisit || isNaN(lastVisit) ) article.remove(); }); Tags are: TimeStamp Body tag creates invisible HTML tag with timestamp. Parameters are: 1) id Optional parameter. Describes an ID for the tag.
for downloading: Library: timestamptag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags. |
Also in Coldtags:
|