Displaying a value on the header of every page without a page refresh at all
<p>I need to display some value (<em>net amount</em> maintained by a shopping cart and number of items in the cart) on the header of every page. When a new item is added to the cart or deleted or the cart is updated, the updated value should be displayed on the header with no page refresh by the user.</p>

<p>I think, I need to reload the page right after it finishes loading. I tried the following.</p>

<pre><code>&lt;META HTTP-EQUIV="REFRESH"; CONTENT="1";URL=ShoppingCart.php"&gt;
</code></pre>

<p>but it refreshes the page on every second which is indeed not required. Also tried using <code>header()</code> something like this but it's not suitable <code>header("Location: #");</code></p>

<p>Is there a way to do so? Any time the cart is updated, it should be reflected on the header of every page without a page refresh?</p>
