1

This question is related with Change on the back-end takes 30 mins or longer to show on front-end, what could possible be the cause?

When I asked the above question I couldn't see any changes on front-end even though I cleared browser cache or changed to a new browser. I still don't know what was going on that day, but today the problem seems to be more identifiable.

The site in question is http://www.peaceevereci.tv/. I make change to one of the menu itmes, on my other joomla sites, on same computer, this kind of change would of course be seen on front-end in no time; but for this site, I need to cleared browser cache before I can see the change. I contacted the host provider, dreamhost, they gave me a link with proxy, and from that link I can see changes immediately. So they said this had nothing to do with them because that means they have served the content correctly. So this has something to do with my joomla setting?? I can't find where.

After all, browser only caches scripts and images, no? How come it is caching my menu item, which Joomla gets from a database?

By the way, not only changes like changing menu item title, but also toggling feature status needs clearing browser cache before it can be seen. I havn't tried them all but I guess any change I make on back-end would require clearing browser cache, why is this?

2

We had a similar issue with a client before - you can find it here. The issue was resolved by creating an .htaccess file under the administrator folder, and then adding (to the .htaccess file) specific instructions not to cache any HTML or PHP files. Try it on your website and let us know whether it'll solve your problem. Note that if you still have the problem on your backend, then this means there is some aggressive host caching going on, and you must contact your host to avoid it.

As for answering your questions: Browsers, by default, cache JS/CSS/media/document files - they don't cache PHP/HTML pages. Joomla can instruct the browser (by using the "System - Cache" plugin) to leverage browser caching. Additionally, some servers explicitly tell the browser to cache PHP/HTML content to reduce their load (this is a widespread characteristic in mainstream shared hosts). However, it is always up to the browser to honor these instructions (and almost all browsers do, unless their internal settings are modified not to).

Again, if you tell the browser, in the .htaccess file, not to cache PHP/HTML files, then most likely your problem will be solved.

  • basically even empty htaccess will help as it drops inherited rules – Alexandr Jul 5 '16 at 7:51
  • I don't think so. The first thing that we do when we have this is to rename the .htaccess file (in the main Joomla folder) and in that particular scenario it didn't help. You must explicitly remove any caching in an .htaccess file under the administrator folder. – itoctopus Jul 5 '16 at 13:18
  • well if the issue is in place not depending on whether htaccess in root folder exists or not - then issue is server configuration. And most servers I've seen doesn't set up caching headers by default. – Alexandr Jul 5 '16 at 13:24
  • I'm not sure I fully understand your comment (let me know if that's the case). Caching issues are not caused by the mere existence of an .htaccess file. If the .htaccess file explicitly specify that caching should be enabled, then renaming it will fix the problem (the caching rules in that .htaccess file will have no effect). – itoctopus Jul 5 '16 at 13:30
  • Yes, agree. But You've sad that renaming of htaccess in the root didn't solve your problem and it means that caching was set by server config, which means that empty htaccess in admin will not help, as empty htaccess applies default server config. But if renaming helps - then it means that no need in explicitly disable caching rules, and empty htaccess in admin will solve the issue. – Alexandr Jul 5 '16 at 13:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.