I suggest to have the online box at main.tpl presented inside a <iframe src="...." ></iframe> so it will not be included on the cached pages and it will be always showing the real online members/guests.
You can do that if you want with a custom template by tacking on &nocache=1 to the url, but I won't since an iframe is a bit of a hack and reduces the point of caching considerably.
I have implemented and it works perfect, thanks. I can help if someone wants to implement it and has some difficulties.
Just some thoughts on your comment
reduces the point of caching considerably
I believe the point of caching is for not so frequently modified data as category names, links, descriptions, threads, etc. I'm using cache only for visitors updated every two hours so after a member edits a link a phrase like this appears 'your changes will be visible for visitors within the next 2 hours'. I believe the member system that's updated so frequently should not be cached and the iframe is a very good solution.
The point of caching is to reduce server load. The iframe means each page loads for the price of two, one cached and one not. The total may only be a little better than by not using caching, for that page, though if you don't have online users on every page maybe it's not too bad.
Also I don't think iframe content is indexed by search engines.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on online system
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
I suggest to have the online box at main.tpl presented inside a <iframe src="...." ></iframe> so it will not be included on the cached pages and it will be always showing the real online members/guests.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You can do that if you want with a custom template by tacking on &nocache=1 to the url, but I won't since an iframe is a bit of a hack and reduces the point of caching considerably.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
I have implemented and it works perfect, thanks. I can help if someone wants to implement it and has some difficulties.
Just some thoughts on your comment
I believe the point of caching is for not so frequently modified data as category names, links, descriptions, threads, etc. I'm using cache only for visitors updated every two hours so after a member edits a link a phrase like this appears 'your changes will be visible for visitors within the next 2 hours'. I believe the member system that's updated so frequently should not be cached and the iframe is a very good solution.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The point of caching is to reduce server load. The iframe means each page loads for the price of two, one cached and one not. The total may only be a little better than by not using caching, for that page, though if you don't have online users on every page maybe it's not too bad.
Also I don't think iframe content is indexed by search engines.