tel que tu le dis c'est pas exactement la bonne syntaxe. Je pencherais plutôt vers une variable dans l'url qui a une valeur changeante à chaque click. Si c'est ce que tu as fais il n'y a pas de raison pour que cela ne fonctionne pas.Bonjour a tous,
J'ai donc recuperer des astuces sur le net de type mettre un ?et un numero derriere le leins de l'image, cela fonctionne une fois sur deux sur SAFARI.
quelqu'un aurait il une autre astuce?
visiblement c'est la memoire cache qui ne se rafraichie pas assez vite...
Code : Tout sélectionner
<meta http-equiv="Pragma" content="no-cache">
A compléter éventuellement avec ceux-ci:Les scripts PHP génèrent souvent du HTML dynamiquement, qui ne doit pas être mis en cache, ni par le client, ni par les proxy intermédiaires. On peut forcer la désactivation du cache de nombreux clients et proxy avec :
Example#5 Interdire la mise en cache avec header()<?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date du passé ?>
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
Je ne sais plus lesquels servent vraiment, tu n'auras qu'à faire des essais
Code : Tout sélectionner
<meta http-equiv="expires" content="Wed, 31 Dec 2000 00 :00 :00 GMT">
<meta http-equiv="pragma" content="no-cache">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<title>Patrick LEGHIMA - Architecte d'Interieur - 24, rue d'Armaillé 75017 PARIS - tel:01.55.37.03.03- fax: 01.55.37.03.04 - [email protected]</title>
<csscriptdict>
<script><!--
CSInit = new Array;
function CSScriptInit() {
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.length;i++)
idxArray[i] = i;
CSAction2(CSInit, idxArray);}
CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { return CSFindElement(s,0); }
function CSFindElement(n,ly) { if (CSBVers < 4) return document[n];
var curDoc = ly ? ly.document : document; var elem = curDoc[n];
if (!elem) { for (var i=0;i<curDoc.layers.length;i++) {
elem = CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
return elem;
}
function CSClickReturn () {
var bAgent = window.navigator.userAgent;
var bAppName = window.navigator.appName;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
return true; // dont follow link
else return false; // dont follow link
}
function CSButtonReturn () {
var bAgent = window.navigator.userAgent;
var bAppName = window.navigator.appName;
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
return false; // follow link
else return true; // follow link
}
CSIm = new Object();
function CSIShow(n,i) {
if (document.images) {
if (CSIm[n]) {
var img = (!IsIE()) ? CSFindElement(n,0) : document[n];
if (img && typeof(CSIm[n][i].src) != "undefined") {img.src = CSIm[n][i].src;}
if(i != 0)
self.status = CSIm[n][3];
else
self.status = " ";
return true;
}
}
return false;
}
function CSILoad(action) {
im = action[1];
if (document.images) {
CSIm[im] = new Object();
for (var i=2;i<5;i++) {
if (action[i] != '') { CSIm[im][i-2] = new Image(); CSIm[im][i-2].src = action[i]; }
else CSIm[im][i-2] = 0;
}
CSIm[im][3] = action[5];
}
}
CSStopExecution = false;
function CSAction(array) {
return CSAction2(CSAct, array);
}
function CSAction2(fct, array) {
var result;
for (var i=0;i<array.length;i++) {
if(CSStopExecution) return false;
var actArray = fct[array[i]];
if (actArray == null) return false;
var tempArray = new Array;
for(var j=1;j<actArray.length;j++) {
if((actArray[j] != null) && (typeof(actArray[j]) == "object") && (actArray[j].length == 2)) {
if(actArray[j][0] == "VAR") {
tempArray[j] = CSStateArray[actArray[j][1]];
}
else {
if(actArray[j][0] == "ACT") {
tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
}
else
tempArray[j] = actArray[j];
}
}
else
tempArray[j] = actArray[j];
}
result = actArray[0](tempArray);
}
return result;
}
CSAct = new Object;
// --></script>
</csscriptdict>
<csactiondict>
<script><!--
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button2',/*URL*/'Images/Pt2-off.jpg',/*URL*/'Images/Pt2-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button9',/*URL*/'Images/Pt3-off.jpg',/*URL*/'Images/Pt3-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button10',/*URL*/'Images/Gd1.jpg',/*URL*/'',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button4',/*URL*/'Images/Pt4-off.jpg',/*URL*/'Images/Pt4-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button5',/*URL*/'Images/Pt5-off.jpg',/*URL*/'Images/Pt5-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button3',/*URL*/'Images/Pt6-off.jpg',/*URL*/'Images/Pt6-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button6',/*URL*/'Images/Pt7-off.jpg',/*URL*/'Images/Pt7-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button7',/*URL*/'Images/Pt8-off.jpg',/*URL*/'Images/Pt8-on.jpg',/*URL*/'','');
CSInit[CSInit.length] = new Array(CSILoad,/*CMP*/'button',/*URL*/'Images/Pt9-off.jpg',/*URL*/'Images/Pt9-on.jpg',/*URL*/'','');
// -->
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</csactiondict>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="white" onload="CSScriptInit();">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="699" background="../Communs/Tab21.jpg">
<tr>
<td colspan="9"><img src="../Communs/Tab01.jpg" width="700" height="70" border="0"></td>
</tr>
<tr height="57">
<td width="130" height="57"><img src="../Communs/Tab02.jpg" width="130" height="57" border="0"></td>
<td width="57" height="57"><img src="Images/Pt1-on.jpg" width="57" height="57" border="0" onDblClick="MM_goToURL('parent','../../formulaire.php?origine=resid&nimage=1&nchantier=1');return document.MM_returnValue"></a></td>
<td width="14" height="57"><img src="../Communs/Tab03.jpg" width="14" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt2-on.jpg"><a href="Page2.html" target="_self"><img src="Images/Pt2-off.jpg" name="button2" width="57" height="57" border="0"></a></csobj></td>
<td width="14" height="57"><img src="../Communs/Tab04.jpg" width="14" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt3-on.jpg"><a href="Page3.html" target="_self"><img src="Images/Pt3-off.jpg" name="button9" width="57" height="57" border="0" onDblClick="MM_openBrWindow('Page3.html','','')"></a></csobj></td>
<td width="40" height="57"><img src="../Communs/Tab05.jpg" width="40" height="57" border="0"></td>
<td width="16" rowspan="5"><csobj w="200" h="200" t="Button"><a href="/Chantier1/Big1.html" target="_blank"><img src="Images/Gd1.jpg" width="200" height="200" name="button10" border="0"></a></csobj></td>
<td height="57"><img src="../Communs/Tab06.jpg" width="130" height="57" border="0"></td>
</tr>
<tr height="14">
<td colspan="7" height="14"><img src="../Communs/Tab07.jpg" width="370" height="14" border="0"></td>
<td height="14"><img src="../Communs/Tab08.jpg" width="130" height="14" border="0"></td>
</tr>
<tr height="57">
<td width="130" height="57"><img src="../Communs/Tab09.jpg" width="130" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt4-on.jpg"><a href="Page4.html" target="_self"><img src="Images/Pt4-off.jpg" name="button4" width="57" height="57" border="0" onDblClick="MM_openBrWindow('../../varsess4.php','','')"></a></csobj></td>
<td width="14" height="57"><img src="../Communs/Tab10.jpg" width="14" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt5-on.jpg"><a href="Page5.html" target="_self"><img src="Images/Pt5-off.jpg" name="button5" width="57" height="57" border="0" onDblClick="MM_openBrWindow('../../varsess5.php','','')"></a></csobj></td>
<td width="14" height="57"><img src="../Communs/Tab11.jpg" width="14" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt6-on.jpg"><a href="Page6.html" target="_self"><img src="Images/Pt6-off.jpg" name="button3" width="57" height="57" border="0" onDblClick="MM_openBrWindow('../../varsess6.php','','')"></a></csobj></td>
<td width="40" height="57"><img src="../Communs/Tab12.jpg" width="40" height="57" border="0"></td>
<td height="57"><img src="../Communs/Tab13.jpg" width="130" height="57" border="0"></td>
</tr>
<tr height="14">
<td height="14" colspan="7"><img src="../Communs/Tab14.jpg" width="370" height="14" border="0"></td>
<td height="14"><img src="../Communs/Tab15.jpg" width="130" height="14" border="0"></td>
</tr>
<tr height="57">
<td width="130" height="57"><img src="../Communs/Tab16.jpg" width="130" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt7-on.jpg"><a href="Page7.html" target="_self"><img src="Images/Pt7-off.jpg" name="button6" width="57" height="57" border="0" onDblClick="MM_openBrWindow('../../varsess7.php','','')"></a></csobj></td>
<td width="14" height="57"><img src="../Communs/Tab17.jpg" width="14" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt8-on.jpg"><a href="Page8.html" target="_self"><img src="Images/Pt8-off.jpg" name="button7" width="57" height="57" border="0" onDblClick="MM_openBrWindow('../../varsess8.php','','')"></a></csobj></td>
<td width="14" height="57"><img src="../Communs/Tab18.jpg" width="14" height="57" border="0"></td>
<td width="57" height="57"><csobj w="57" h="57" t="Button" ht="Images/Pt9-on.jpg"><a href="Page9.html" target="_self"><img src="Images/Pt9-off.jpg" name="button" width="57" height="57" border="0" onDblClick="MM_openBrWindow('../../varsess9.php','','')"></a></csobj></td>
<td width="40" height="57"><img src="../Communs/Tab19.jpg" width="40" height="57" border="0"></td>
<td height="57"><img src="../Communs/Tab20.jpg" width="130" height="57" border="0"></td>
</tr>
<tr height="122">
<td height="122" colspan="9" valign="top"></td>
</tr>
</table>
</div>
</body>
</html>
[Note : ce message a été posté de manière anonyme avant d'être réattribué à son auteur]
Je te recommanderais d'oublier pour l'instant safari. Quoique certains puissent en penser, Safari est loin d'être parfait (en particulier la dernière version (3.1), et en particulier sous windows) et ne peut pas être une référence de compatibilité universelle.et bien la solution qui fonctionnait le mieux mais pas à 100% etait le changement de nom des images a telecharger. Malheureusement certaines fois ça ne fonctionne pas et ça ralenti considerablement le chargement de la page..
je precise que je suis sur pc et que j'essai depuis un SAFARI qui tourne sous windows...
Je ne sais plus comment m'orienter?
cote cache ou cote changement de nom d'image