hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Problems with caching
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Problems with caching

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-08-2008, 05:11 PM
postman101 postman101 is offline
Newbie
 
Join Date: Nov 2007
Posts: 26

Problems with caching


Dear fellas,

Please help me solve the big and urgent problem I have.
My site runs relatively slow and I want to add chat to it

I do have this (as recommended by a friend) in my .htaccess because I want to be able to log all of the clicks on my site:

#NEVER CACHE
<FilesMatch "\.(html|htm|php|cgi|pl)$">
Header set Expires "Thu, 01 Dec 2003 16:00:00 GMT"
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
Header set Pragma "no-cache"
</FilesMatch>

My site is relatively slow...and I would like to speed it up witouth loosing the benefit of being able to log all the clicks on the site.

How should I go about this problem...what i realized is that user avatars are not cached and because my site is a social networking site on some pages it has lots of avatar images.
Should I enable user avatar caching and/or do some other stuff? and if yes how should I enable user avatars but still be able to log all the users clicks?

I am running the site on a VPS server with 768MB RAM.

Thank you VERY much.

Reply With Quote


Sponsored Links
  #2  
Old 02-08-2008, 05:15 PM
NWSTech NWSTech is offline
Web Hosting Evangelist
 
Join Date: Apr 2005
Posts: 527
why would caching cause issues, most users browsers wont cache an entire page so they will still request a page anyway

__________________
Reliable, Affordable Web, business and shoutcast hosting - http://www.loadsofspace.net
on-demand shoutcast also available

Reply With Quote
  #3  
Old 02-08-2008, 05:26 PM
postman101 postman101 is offline
Newbie
 
Join Date: Nov 2007
Posts: 26
Quote:
Originally Posted by NWSTech View Post
why would caching cause issues, most users browsers wont cache an entire page so they will still request a page anyway
I see. 98% of the pages of my site are .php
If I delete:
#NEVER CACHE
<FilesMatch "\.(html|htm|php|cgi|pl)$">
Header set Expires "Thu, 01 Dec 2003 16:00:00 GMT"
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
Header set Pragma "no-cache"
</FilesMatch>

...would I still be able to log all (or at least 98% of all) URI requests?
Would removing those lines speed up my site significantly or is there something else in addition that I need to do?
I am not sure why users avatars are not cached...and what would I need to do to enable that...

Reply With Quote
Sponsored Links
  #4  
Old 02-08-2008, 05:47 PM
Steve_Arm Steve_Arm is offline
Community Guide
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,479
About the avatars, if you output them with php i.e.: <img src="img.php?id=10" />
they will never cache.

Can you post the url to the site?

__________________


Reply With Quote
  #5  
Old 02-08-2008, 05:57 PM
postman101 postman101 is offline
Newbie
 
Join Date: Nov 2007
Posts: 26
Quote:
Originally Posted by Steve_Arm View Post
About the avatars, if you output them with php i.e.: <img src="img.php?id=10" />
they will never cache.

Can you post the url to the site?
Steve, site is password-protected..but if you think it can help I can provide you with an account.

Links to images are: icon.php?id=19. So I guess there is no way to cache them?

Is there anything else I could do to speed up my site but to preserve logging of all URI's?

Reply With Quote
  #6  
Old 02-08-2008, 06:18 PM
Steve_Arm Steve_Arm is offline
Community Guide
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,479
Yeah, that way they won't cache. Been there done that. Had to revert to plain image calls.
PM the url to take a look and an account.
How many queries run per page on average?

__________________


Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
WiredTree Decreases Customer Website Loading Times with SSD Caching Web Hosting News 2013-04-02 13:56:08
WHD.global 2013: SiteLock Adds Web Application Firewall and CDN to Security Portfolio Web Hosting News 2013-03-19 13:48:01
Certified Hosting Deploys Varnish HTTP Caching for Faster Hosting Services Web Hosting News 2012-02-28 14:10:30
Web Host Amazon Web Services Launches ElastiCache Service Web Hosting News 2011-08-23 17:53:00
Q&A: Liquid Web's Cale Sauter Discusses the Web Host's New CDN Service Web Hosting News 2011-05-25 14:40:01


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?