Welcome Guest, Not a member yet? Register   Sign In
Browser Cache
#1

[eluser]reset[/eluser]
Hello all,

I've a problem with browser cache, user must sign on my CI web for view information about subjects, but, if the user closes session but somebody write the url on the web browser, the web browser shows the page on cache. How I can avoid this? Is there some library,helper or php function that I can use?

Thanks
#2

[eluser]Tom Glover[/eluser]
Add to your view files this:
Code:
<meta http-equiv="Pragma" content="no-cache">
<!-- Pragma content set to no-cache tells the browser not to cache the page
This may or may not work in IE -->

<meta http-equiv="expires" content="0">
<!-- Setting the page to expire at 0 means the page is immediately expired
Any vales less then one will set the page to expire some time in past and
not be cached. This may not work with Navigator -->

or to .htaccess this:
Code:
ExpiresDefault A0
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cache"
#3

[eluser]reset[/eluser]
Thanks WackyWebs.net, I tried the option of .htaccess, only indicate that to work we must load this modules in httpd.conf:

LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so.

Thanks again,
A greeting




Theme © iAndrew 2016 - Forum software by © MyBB