Problem with Server caching? everything

#1
[eluser]CARP[/eluser]
Hi
I've finished developing a large codeigniter application. It contains both, dashboard panel and main frontend. It uses bootstrap, jquery, and a series of plugins like fancybox, validate, etc. All working fine in testing server.

Now I've uploaded to production server, which has safemode, among other restrictions I cannot modify.

I've noticed that whatever change I do to a view file, the results aren't shown after I load the page again in the browser. I have to hard refresh (ctrl+f5). The same happens in backend/dashboard. The set_flashdata doesn't work at first time. I use redirect("...", "refresh"); but the flashdata's message doesn't show until I hard refresh the page again

Is there any way to put some php directive in the inc_header.php of both (dashboard/frontend) files, or some directive in an .htaccess file or maybe the meta pragma no-cache so this doesn't happen?

Thanks a lot in advance

#2
[eluser]XMadMax[/eluser]
Hi

Check any proxy between you and the server.

Also, you can put this at start on index.php:

header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 1 Jan 2000 00:00:00 GMT");
header("Pragma: no-cache");


#3
[eluser]CARP[/eluser]
Thanks XMadMax
That solved temporarily the problem

#4
[eluser]jairoh_[/eluser]
yeah that's how the flashdata works, the page should be redirected.

#5
[eluser]CARP[/eluser]
[quote author="jairoh_" date="1372978180"]yeah that's how the flashdata works, the page should be redirected.[/quote]

yes, i was doing the redirection after the flashdata, but it was not working/showing due to that f... server. Thanks i could solve this with the above headers


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.