How to make a part of HTML file not updated under a certain condition
<p>I have a HTML file which is updated every 30 seconds. It is rendered by Jinja2 from a certain python file to pass variables. Is there any way to omit updating of some elements?</p>

<p>The code looks like that:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;My site&lt;/title&gt;
&lt;meta http-equiv="refresh" content="30"&gt;
&lt;style&gt;

b.value {
position: absolute;
border: 2px solid black;
text-align: center;
padding: 20px;
}

.head {
position: absolute;
}

&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;b class="value" style="left:920px;"&gt;{{ var1 }} %&lt;/b&gt;&lt;/h2&gt;
&lt;h3 style="padding-left:860px;padding-top:200px;"&gt; Text 2: under me is the part I want to update only when the condition is true&lt;/h3&gt;
{% if var2 != 0 %}
   &lt;b class="head" style="padding-left:900px;"&gt;{{ var2 }}&lt;/b&gt;
{% endif %}

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I want to refresh the variable <em>var2</em> only if it is not equal to 0 and not every 30s, as the rest of page is updated.</p>

<p>Thank you for the tips,
Kaki</p>