Jump to content

Archived

This topic is now archived and is closed to further replies.

atcdomainsolutions

Speed Up Your DMS Site - Little Tip I Learned

Recommended Posts

atcdomainsolutions

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>

 

Share this post


Link to post
Share on other sites
timtimhungerfordcom

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

Share this post


Link to post
Share on other sites
atcdomainsolutions

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.

Share this post


Link to post
Share on other sites
timtimhungerfordcom

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?

Share this post


Link to post
Share on other sites
msaizan

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

Share this post


Link to post
Share on other sites
keegan

Not sure how this works, but it made a 7 second average load time into maybe 3 seconds tops. Thanks alot. Going to use this across all my clients sites!

Share this post


Link to post
Share on other sites
thebrasseffect

Did you have to remove any of the "other" code in the .htaccess file? I just added it to the bottom and haven't noticed any difference.

 

thanks,

Share this post


Link to post
Share on other sites

  • Similar Content

    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a week ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • JawDesigns
      By JawDesigns
      Hi everyone,
      Flywheel have reported errors on my clients site 'www.racewaredirect.co.uk' and it's not loading. Can someone please provide some information on how to fix this? The site has never experienced these issues before.
      Thanks,
      James Wilson
    • MissT
      By MissT+
      Hi there,
      I've got an issue with 3 websites built with DMS since I migrated them from http to https that I need help with please.
      When any changes are made - e.g. new posts added or existing posts amended - certain sections of the live site seem to break e.g. image headers hang and don't load (b/g on canvas section), sliders hang and don't load (Revslider), flipper section doesn't load.
      Logging in and then clicking 'Edit the site using DMS' seems to fix the problem. Often if I try to open up another browser window to edit the site / re publish I'm unable to as the page wont load / hangs while trying to load.
      Any ideas how to fix this? On a couple of the sites I've installed a caching plugin as I thought it might be a loading speed issue but it's still happening.
      Website URL's can be provided privately.
      Many thanks in advance.
×