Testing for Cached Elements via Javascript