Ciao,
potremmo trovare una sintesi tra i due modi di procedere.
Premetto che io ho i cookies disabilitati.
Io farei una cosa del genere, immaginiamo di essere su index.php:
<script language="javascript">
<!--
<?php
(isset($_GET['screenX']))
? echo "var x = " . $_GET['screenX']
: echo "var x = null";
?>
var s_width ='';
var s_height ='';
s_width=screen.width
s_height=screen.height
if(x == null){
var url = "";
if (s_width == "1024"){
url = "index.php?screenX=348"
} else {
url = "index.php?screenX=200"
}
this.location = url;
}
//-->
eccetera eccetera eccetera
</script>
L'eventualità è che l'utente vede ricaricarsi la pagina una volta,
ma avrebbe una formattazione ottimale perchè abbiamo passato a PHP
cio che ci serve per una ottimizzare l'aspetto della pagina.
Che ne dite?

Rispondi quotando