How to put a string at the end of all URLs via PHP (CodeIgniter)

3

I'm using the CodeIgniter framework to develop a system. But in the company where they are using, the pages are not updating right, it's like the cache gives the whole page and only when I give an F5 it updates.

For example, there is a screen where all users are displayed, if a new user is registered and I return to this page he does not display the new user, only when I give an F5 does he update and show the new user. >

I was able to solve the problem by putting a random string at the end of the URL as if it were a GET, so the browser understands that it is a new page and loads from scratch.

The problem is that there are many pages, is there a configuration in CodeIgniter or a function in PHP that places a string at the end of all URLs?

Looking like this: example.com?FaYrSkuVu

Or does anyone know of any other way to solve this problem?

    
asked by anonymous 23.07.2015 / 18:15

1 answer

2

To disable CodeIgniter caching you can either remove this tag from your project or clear cache time:

$this->output->cache(0);
    
23.07.2015 / 19:39