# no-cache tag in xhtml



## v-six (Sep 12, 2004)

Hi guys, really quick question and I promise I'll leave you alone.
The tag for no-cache that I've seen everywhere is
<meta http-equiv="pragma" content="no-cache">
but this doesn't validate at W3. I changed it to 
<meta http-equiv="pragma" content="no-cache"/>
and it validates fine. Is there any reason for this, and any problem with putting the slash in?


----------



## ebackhus (Apr 21, 2005)

Well, the / usually is used in closing tags as I'm sure you know. Why W3 didn't validate it is beyond me. More importantly, does it work without it?


----------



## v-six (Sep 12, 2004)

It works without the closing tag. The weird thing is, if you look up no-cache, everywhere you see it will be the version without the closing tag.


----------



## DumberDrummer (Oct 27, 2003)

Ok, there have been some changes over time in what the w3 considers "proper" html, which is usually to normal html what oxford english is to our vernacular. 

Anyway, one of the things they require for xhtml 1.0 strict is a closing tag for ALL tags, even ones that don't normally close, like img, meta, etc...

The way to do it "properly" is to self-close the tag. 

So where you used to go <img src="foofoo.jpg" alt="foofoo">

You now have to self close it so it will validate: <img src="foofoo.jpg" alt="foofoo" />

Same with BR: <br /><br />

and so forth. 

Just one of the ways the W3 is trying to clean up and standardize Markup language.

Sidenote: some older browsers won't render the tag properly unless you add a space after the tag text and the self-close, ex: <br/> as opposed to <br />.


----------



## Grove (Jun 21, 2005)

Good Point DD. The languages are being updated all the time. XHTML must be in the proccess of adding the / as it will become important as new code in the future will need to use it.

They are also trying to stay consistent with the other languages. :sayyes:


----------

