Hello,

in my html.tpl.php i have added a code like this at the very top to perform some actions when the user first enters the site (no need to do anything when the user continues his navigation)

<?php
if(!$_SESSION['var']) {
$_SESSION['var'] = true;
/* do some stuff... */
}
?>

If I don't disable caching, the code above runs correctly the first time, but if i close my browser and re-enter the site, it never gets executed.

Any ideas to make it work without disabling caching?

EDIT: putting the code in the index.php file works fine also with caching enabled, but I'm on a Drupal Multisite install... so... any ideas to save both caching and multi-install environment? :D

Comments