Article hit counter and Joomla 2.5.x cache? - caching

There was a comment on Adding in a hit counter to Joomla that the cache impacts the stock hit counter. Do you have any idea how I can fix that bug in Joomla or where I can start to look in the code?
I see it's submitted in the bug tracker but nobody is assigned to it. I believe the hits must be increased before the cache is served, and at the moment the function that generates the content is actually the one that calls the hit increasing function, so that's why the hits only increase upon a fresh article render.

Joomla counts and update the article hits when the page is built, but if the caching plugin is enabled and the page has been cached to disk, the page is loaded directly from the cache directory, without updating the number of views. You can try this joomla hack here:
Joomla Hit Counter Updater
Even though it's not free, it might help you.

Related

Wordpress : W3 Total cache - Object cache issues

I'm helping friends with their blog, their admin panel is incredibly slow. After testing all the plugins, I saw that W3 Total cache was responsible of this slowness, more precisely the Object cache option. If I disable this option, the admin runs normally, so does the front of the website.
So, why don't I simply disable W3 Total Cache ?
When I do this, some content disapear from the homepage, some text changes...
I'm not sure how Object caching is working, so my question is : Why ? How can I fix this ?
W3 Total Cache tries to speed up the front end of the website by generating and caching HTML responses for each page. As a user requests a page, it is not processed by the bulk of the PHP that makes up wordpress and is quickly served a cached html page.
If the site is large, and the plugin isn't tuned correctly, it can dramatically slow down the admin side (which is run by PHP and not cached by the plugin).
To fix this, you will have to find the right balance on how often certain pages / post types are cached. If the site isn't a busy one, or if speed is not an issue (I can't see how speed wouldn't be an issue but that's an opinion) you are safe to remove the plugin.
W3 Total Cache has some good information on helping someone determine the settings that should be used. Use that info, along with page view stats to figure out your next steps.

How to force the browser to show the most up to date files instead of relying on application cache?

It's very important for the website I'm working on to be offline-functional. I'm using a Cache Manifest to store all the files on the application cache, so that takes care of that and all is good and well.
BUT, as I read and noticed myself, the browser first shows the cached version of the site before checking for an update online. Hitting refresh reloads the cache again, with the new cached files this time (or what it had time to update for the swift refreshers).
I'm aware of this fix : http://www.html5rocks.com/en/tutorials/appcache/beginner/, where the user is told an update is available and is asked to refresh the page. Not a bad method, but still sketchy for user experience.
Is there any other way to force the browser to show the most up to date files if online? Would cache busting all files manually AND using a cache manifest fix this problem, or will it conflict with the cache manifest and cause problem to the offline functionality?
I found something that works well for me:
The URL linking to the web page contains a parameter. If there is ever a change to the page or related files, the url is changed to something like this: http:/ /www.mywebsite.com/mypage.html?v=3 where v=3 is changed depending on updates.
This is a longer fix to implement (finding every page affected by a change & changing all their cache busting links), but the pages at least show what they're supposed to on the first load and the cache manifest still load the update for offline viewing.

How to create a hit counter module in joomla 2.5?

How to create a hit counter module in joomla 2.5
Use this extension to create hit counter
Module Hit Counter
In production Joomla will have cache enabled, and this makes it necessary to handle the hit counting with javascript.
Since we accept this limitation, maybe it's best to use a dedicated server such as piwik, that beyond counting hits will also allow you to study trends, analyse referrals, navigation paths, time on site etc.

How cache all page before user visit website in cakephp

how to cache all page before user visit my website.
You can suggest i how to make that.
Please more specify because i dont know much about cache, i only know use it in cakephp.
This might be just what you are looking for:
https://github.com/mcurry/html_cache
It will serve up an html cached version of a page without hitting cakephp or even php. This will make it thousands of times faster than cake. See this link as well, item #4.
http://www.pseudocoder.com/archives/2009/03/17/8-ways-to-speed-up-cakephp-apps/

How to force a page to be removed from the search engine index?

Situation: Google has indexed a page in a forum. The thread is now deleted. How/whether can I make Google and other search engines to delete the cached copy? I doubt they would have anything against that since the linked page does not exist anymore and keeping the index updated and valid should be in their best interests.
Is this possible or do I have to wait months for an index update? Or will the page now stay there forever?
I am not the owner of the respective site so I can't change robots.txt for example. I would like to force the update as the "third party".
I also noticed that a new page on that resource I created two days ago is already in the cache. Given that can I make an estimate how long will it take for a non valid page on this domain to be dropped?
EDIT: So I did the test. It took google shortly under 2 months to drop the page. Quite a long time...
It's damn near impossible to get it removed - however replacing the page with entirely blank content will ensure that you nuke the ranking of the page when it is respidered.
You can't really make Google delete anything, except perhaps in extreme circumstances. You can adjust your robots.txt file to promote a revisit interval that might update things sooner, but if it is a low traffic site, you might not get a revisit very soon.
EDIT:
Since you are not the site-owner, you can modify the meta tags on the page with "revisit-after" tags as discussed here.
You cant make search engines to remove the link but don't worry soon the link will be removed as the link will not longer be active. You need not wait for months for this to happen.
If your site is registered with Google Webmaster, you can request to remove pages from the index. It works, I tried and used it in the past.
EDIT: Since you are not the owner, I am afraid that this solution would not work.

Resources