Jump to content


Photo
- - - - -
DMS2

Speed Up Your DMS Site - Little Tip I Learned

dms dms2 speed caching

  • Please log in to reply
4 replies to this topic

#1 atcdomainsolutions

atcdomainsolutions

    Super Member

  • Members

  • 210 posts
  • LocationSouth Dakota
  • Framework Version:DMS
  • Country: Country Flag

Posted 10 April 2014 - 03:29 PM

Just had a chat with tech support and while most of us use caching plugins for Wordpress, I got a little tip (sure the super techies here already know this) but I can admit I didn't.  He gave me some commands to add to the .htaccess file of my domains root directory that I build sites off of as well as my own sites and it definitely speeds things up tremendously.

 

I just added the below code to the top of my .htaccess file (I know this is a file most shouldn't mess with) but I added this code exactly as it appears.  Just figured I'd share with anyone who may have issues with site loading speeds.  I'm with Hostgator and typically don't have issues (been with them for years) but felt I had to share this for those who haven't tried before:

 

CODE:

 

 

<IfModule mod_deflate.c>

SetOutputFilter DEFLATE

<IfModule mod_setenvif.c>

# Netscape 4.x has some problems...

BrowserMatch ^Mozilla/4 gzip-only-text/html

 

# Netscape 4.06-4.08 have some more problems

BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine

# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

 

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48

# the above regex won't work. You can use the following

# workaround to get the desired effect:

BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images

SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary

</IfModule>

<IfModule mod_headers.c>

# Make sure proxies don't deliver the wrong content

Header append Vary User-Agent env=!dont-vary

</IfModule>

</IfModule>

 

<IfModule mod_expires.c>

# Enable expirations

ExpiresActive On

# Default directive

ExpiresDefault "access plus 1 month"

# My favicon

ExpiresByType image/x-icon "access plus 1 year"

# Images

ExpiresByType image/gif "access plus 1 month"

ExpiresByType image/png "access plus 1 month"

ExpiresByType image/jpg "access plus 1 month"

ExpiresByType image/jpeg "access plus 1 month"

# CSS

ExpiresByType text/css "access 1 month"

# Javascript

ExpiresByType application/javascript "access plus 1 year"

</IfModule>

 


  • msaizan, batman, GetMeWebDesign and 3 others like this

#2 timtimhungerfordcom

timtimhungerfordcom

    Advanced Member

  • Members

  • 36 posts
  • Country: Country Flag

Posted 23 April 2014 - 05:29 PM

How much of an speed increase you have noticed by modifying the htaccess? (I also use hostgator)



#3 atcdomainsolutions

atcdomainsolutions

    Super Member

  • Members

  • 210 posts
  • LocationSouth Dakota
  • Framework Version:DMS
  • Country: Country Flag

Posted 23 April 2014 - 05:55 PM

How much of an speed increase you have noticed by modifying the htaccess? (I also use hostgator)

After the first couple of times I refreshed a site, if it took 7-9 seconds before, it now takes 2-3 at most.  Definitely noticeable.



#4 timtimhungerfordcom

timtimhungerfordcom

    Advanced Member

  • Members

  • 36 posts
  • Country: Country Flag

Posted 23 April 2014 - 09:35 PM

That's quite a big difference, there's a site  I ran into when talking into hostgator (http://gtmetrix.com/)  tells you where the performance is hurting.

 

Is there somewhere I can read this off source so I can know what each command does by any chance?



#5 msaizan

msaizan

    Super Member

  • Members

  • 193 posts
  • Country: Country Flag

Posted 17 May 2014 - 12:10 AM

How cool is that? Works like a charm! Thanks Big Guy. 


  • greenfly and atcdomainsolutions like this





Also tagged with one or more of these keywords: DMS2, dms, dms2, speed, caching