2

I am new to plugin/extension development in EE. I currently have an extension that creates a cookie and saves a value to it. What I want is on every page refresh this value to be updated.

Is there a way to have the extension run on each page refresh?

1 Answer 1

4

Yes: use the sessions_end hook. It runs on every page load. Be sure to check to see if you're using it on the front-end before you set your cookie (I assume you want this for the front-end only).

if(REQ != 'CP')
{
    // do your stuff
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.