That is correct. Not valid HTML.... There is no published specification of HTML that permits such code...
What you are pointing at is an article from Microsoft and is not an HTML specification. Instead it is a very old article that covered quirks of...
APPLIES TO
* Microsoft Internet Explorer 4.01 Service Pack 1
* Microsoft Internet Explorer 4.0 128-Bit Edition
* Microsoft Internet Explorer 3.02
It was dated "February 23, 2004" and was not for a modern browser. MSIE7 Beta has similar issues, but they were fixed before the first official release around Feb 2005.
If you look at the article it also states that it is...
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
But this is 2009... and if you use proper HTML with a proper DoctType, you should not have that type of issue.
The proper META tags would look like:
Code: Select all
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
and would be between the <head> statements at the top of the page. It would work best if the entire document contained a
DocType so that the browser knew which version of HTML you were attempting to use and had valid HTML throughout the page.
I don't have an active webcam at the moment, but I do have a sample page setup that fetches a webcam from South Mountain in Phoenix AZ... Their webcam image is updated only 4 times an hour so it is not the greatest example, but the sample web page using a refresh of 1 minute, seems to work without issues on all modern browsers FF3, MSIE7, Safari3 and even Google Chrome.
http://www.tnetweather.com/test/testit05.php
The code for which is:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
<head>
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="refresh" content="60" />
<title>South Mountain Webcam</title>
<style type="text/css" >
body {
background-color: #C4D0E5;
font-family: verdana;
margin: 10px;
width: 90%;
}
</style>
</head>
<body>
<h2>South Mountain - Phoneix Arizona, USA</h2>
<h3>Webcam Facing East</h3>
<p>
Time: <?php echo date("D M j Y G:i:s T "); ?>
</p>
<div align="center">
<img src="somt1.jpg" alt="Phx Webcam"/> <br/> <br/>
<img src="/images/tnet_valid-xhtml10-blue.png" alt="Valid XHTML"/>
</div>
</body>
</html>
However, using cache control is not normally even needed if you call images properly in a page by adding a unique id at the end of them.
You can do something similar in PHP like:
Code: Select all
<img src="somt1.jpg?<?php echo time(); ?>"
This makes the request look something like:
somt1.jpg?1231069931
The server will ignore the passed parameter, but the browser will consider each instance as a unique file name. You can do the same thing for other fetched content. This is a very common JavaScript technique. There are many JavaScript examples on the net on how to do the same for that as well.
Or course if the visitor's browser cache is full or too large, then none of this works, but that would be the visitors problem, not the web page. Kind of like them running out of disk space.