Hi guys, I've got an online photography gallery that I've implemented code on to make it so that the page won't cache (if it caches then users must clear their cache in order to see any updates or changes)...
while the no-cache code works, I think the problem I'm having is related to my domain.
Basically, I have one server, and two domain names. My second domain is forwarded to a file on my server (index.php) that uses a stylesheet and embeds the flash gallery into the page.
So right now, my second domain is pointing to:
http://www.domain1.com/gallery/index.php
index.php looks like this:
Code:
<html>
<head>
<title></title>
<LINK href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
Header('Cache-Control: no-cache');
Header('Pragma: no-cache');
?>
<div id="flashcontent">
<embed src="gallery.swf" width="100%" height="100%"></embed>
</div>
</body>
</html>
But for some reason, when I visit
www.domain2.com and view source, this is what it shows: <-- this URL still caches the page, as if it's not reading the code in the index.php file that the domain is forwarded to.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<META name="description" content=""><META name="keywords" content="">
</head>
<frameset rows="100%,*" border="0">
<frame src="http://www.domain1.com/gallery/index.php" frameborder="0" />
<frame frameborder="0" noresize />
</frameset>
<!-- pageok -->
<!-- 02 -->
<!-- 7.12-->
</html>
HOWEVER, when I visit the direct URL to the gallery (
www.domain1.com/gallery/index.php), it works fine, displays the correct source code, and doesn't cache the page.
How can I fix this? I can try to clarify more specifically if I was unclear.