Disabling the caching
martin_123
Joined: 2009-04-19
Posts: 9 |
Posted: Thu, 2011-03-17 22:44 |
Hi, I am using Gallery2 and I want to disable the cashing of my photos and .php and .css scripts in the temporary internet folder. Thanks, |
|
Posts: 1642
Please give one good reason why you want to disable caching resources by browsers.
Hint: There is only one such good reason which is that you are writing new code for the site or changing the site layout in which case all you need to do is to switch caching off in your browser.
--
dakanji.com
Posts: 9
Dayo,
You mean there is a plugin for Gallery2 to switch off caching?
Posts: 1642
No. I meant for you to let us know what your reason for wanting to switch browser level caching off globally is ... as there is no logical reason I can think of why anyone would want to do this.
--
dakanji.com
Posts: 9
Dayo,
If you did not read my first post when you responded on it I do advice you to read it first.
If you dont understand what I am saying in my first post I do recommend you to read the link that I included: http://codex.gallery2.org/Gallery1:Securing
If you then still dont understand what the issue is about after reading this, then I cant help you.
Posts: 8339
gallery2/themes/your theme/templates/local/theme.tpl <- copy the original theme.tpl here and add:
to the <head />
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 9
Dear suprsidr,
Thank you for your answer.
I had done this, but the caching in the temporary internet folder keeps on.
I dont know what I do wrong, or where things go wrong.
Posts: 1642
Hi.
I have reread the original post and also followed the link.
The code given above will do the job. However, I would not advise implementing this as the advice given in that G1 article is not sound and will just place unnecessary load on your server with no benefit.
As I wrote earlier, there is no logical reason to do this. It doesn't give you any security, it is a waste of time and even worse, will degrade your server performance.
However, if you still feel you want to do this, you can add it to your theme.tpl as said.
Good luck.
--
dakanji.com
Posts: 9
Dear suprsidr and Dayo,
If you both say that the above script is working then I do have to try again.
I dont know what I did wrong, or what went wrong before, but hopely I can get it working.
Thanks.
Posts: 9
it looks so simple but still no succes when I copy the code in theme.tpl
Posts: 8339
that method was written many years back.
Browsers may have changed the way they handle those directives. They may even completely ignore them.
You'll have to do a little research yourself. try googling it. http://www.google.com/search?q=META+HTTP-EQUIV%3D"Cache-Control"+CONTENT%3D"no-cache"
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 9
Does Gallery2, slider theme, use Iframe?
In that case there might be a problem with the code below,see:
http://code.google.com/p/chromium/issues/detail?id=28035
Comment 8 by
, Jul 15, 2010
works for me using this in a normal page:
<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="Pragma" content="no-store, no-cache" />
<meta http-equiv="Expires" content="0" />
does not work if the page is in an iframe!
Posts: 8339
never tried slider. but if it does, you'd need your code in both heads.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2