• Resolved pixelpinplugins

    (@callumbrankin)


    I’ve just submitted my plugin (A modification of WordPress Social Login) to be added to the WordPress Plugin store.

    In the code review i got back the reviewer mentioned:

    Using session_start() or ob_start() in your plugin without having it encapsulated in a function means that it will run on every single page load when your plugin is active. That means you’ve just broken caching for everyone because the way PHP Sessions work is they indicate the visitor using sessions is unique and should have a non-cached view of the website. This specifically breaks Varnish type caching.

    The session start he was referring to is found here on line 64.

    What do i need to do to solve this?

  • The topic ‘Forced PHP Sessions on all pages’ is closed to new replies.