jQuery - Adding a TimeStamp to Injected Content
<p>I have something along the lines of:</p>


 
 
 


<p>By default all these panels are empty. But user actions can populate the panels, and users can switch between panels.</p>

<p>The problem I have right now is that switching between panels keeps refreshing the content from the server, even when it's already been loaded, which is a slow UI experience.</p>

<p>I was thinking of appending a timestamp to each of the panel divs:</p>

<pre><code>&lt;div id="panel-1" timestamp="13123131313"&gt;&lt;/div&gt;
</code></pre>

<p>And then using that timestamp to determine if I should rehit the server, if it's under a minute don't, if over a minute refresh the content.</p>

<p>What I'm looking for:</p>

<ol>
<li>Your thoughts on this?</li>
<li>Where can I safely store the time stamp?</li>
<li>Suggestions for doing the timestamp comparison. Any simple jQuery solutions?</li>
</ol>

<p>Thanks for helping me think this one through. </p>
