Please Read First
Troubleshooting Tips
Frequently Asked Questions
Before Posting Please Disable Wp Super Cache Plugin
When Posting Please Include Your URL.
Search Forum Using Google Search Box Above
Forum Video

Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2010
    Location
    Idaho Pahhandle
    Posts
    76
    Rep Power
    5

    Default gzip Compression and Load Speed

    I've been persuaded that gzip enabled sites get a plus as one of the prime ranking factors on Google. And take a look at: http://code.google.com/speed/page-sp...zipCompression

    Gzipped sites load faster and save on bandwidth. However, I'm not having any success in setting gzip up with Socrates, although I'm not 100% certain the problem is theme related.

    So, to test this, I opened the header file and placed the following code BEFORE the DOCTYPE line at the very top of the page.

    Code:
    <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
    First I got an error message that this was an unsupported gzip code. So, I tried it on another theme on the same server, and encountered no problem. Subsequently, I got the Socrates site to load, and went over to http://aruljohn.com/gziptest.php where the test revealed that the Socrates page was NOT gzipped. Running the same test with the other theme on the same server, showed that the page there was gzipped.

    I'd like to inquire whether this issue has been addressed with Socrates, since I'd like to be able to gzip my Socrates sites to enhance load speed and save bandwidth.

  2. #2
    Join Date
    Jun 2010
    Location
    Binghamton, NY
    Posts
    2,732
    Rep Power
    8

    Default

    Dan addresses this in this thread:
    http://www.socratestheme.com/forum/showthread.php?t=218

    It is a planned task. Dan will have to post an update on when they expect it to happen.
    Lynn T. Harrison
    Ever Evolving Enterprises
    LynnTHarrison.com (my blog on using WordPress) Testimonials appreciated

  3. #3
    Join Date
    Jun 2010
    Location
    Idaho Pahhandle
    Posts
    76
    Rep Power
    5

    Default

    Quote Originally Posted by lynnth View Post
    Dan addresses this in this thread:
    http://www.socratestheme.com/forum/showthread.php?t=218

    It is a planned task. Dan will have to post an update on when they expect it to happen.
    How does that thread relate to gzip?

  4. #4
    Join Date
    Jun 2010
    Location
    Fort Collins
    Posts
    25
    Rep Power
    0

    Default

    PotentMix,

    All php, css, and html is being compressed. It is only the javascript that isnt being compressed. And that is why you are receiving the 'Not GZipped' message.

    A handful of the js queries that are being used in Socrates are actually Google's and being called from Google. If you look at that header.php file, you will see that it contains some js calls via the script path to its location at Google. As such, the compression would need to be done from where Socrates is pulling that script query, and in this particular instance, that means Google.

    Here is a snippet:
    Code:
    <?php wp_enqueue_script( 'comment-reply' ); ?>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    As Dan mentioned, we may be adding compressed javascript soon.

    Until then, if you wish to compress the script manually, you can download all of the js queries from their location at Google, compress them, upload them to a location on your localhost, and then edit the header.php file to reflect that path.

    As it stands now, a basic install of Socrates has an 80/100 page load time, according to Firebug. This is already a very fast load time, but as always we seek to improve.

  5. #5
    Join Date
    Jun 2010
    Location
    Fort Collins
    Posts
    25
    Rep Power
    0

    Default

    I would also like to add a list of Performance-Optimization that has already been implemented by our developers:

    Combine external CSS
    Enable compression
    Optimize images
    Serve static content from a cookieless domain
    Specify a Vary: Accept-Encoding header
    Remove unused CSS
    Minify HTML
    Minify JavaScript
    Minimize DNS lookups
    Put CSS in the document head
    Remove query strings from static resources
    Serve scaled images
    Specify a cache validator
    Specify image dimensions
    Use efficient CSS selectors
    Avoid bad requests
    Minimize redirects
    Minimize request size
    Optimize the order of styles and scripts
    Parallelize downloads across hostnames
    Serve resources from a consistent URL
    Specify a character set early

    As you can see our developers are quite diligent and have already implemented a substantial amount of Page-Load-Enhancing techniques.
    And, we will add even more soon.

  6. #6
    Join Date
    Jun 2010
    Location
    Idaho Pahhandle
    Posts
    76
    Rep Power
    5

    Default

    Thanks for clarifying all that. I'll pass for now on compressing js.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •