Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Feb 2008
    Posts
    118
    Plugin Contributions
    0

    Default How to Speed Up My Site?

    I'm currently trying to fix some of the low grades I'm getting from "YSlow" report (firefox/firebug add-in)...
    this has led me to try multiple compression methods for CSS and JS files, as well as get rid of the "ETag" error and include an "Expires" header.

    I can't seem to get ANY of these methods to work though...
    I started with Minify, then onto SmartOptimizer and finally just straight htaccess commands.

    Nothing seems to register.

    This stuff isn't that complicated to setup, but after testing all these methods I'm certain I'm being roadblocked by something...
    either something with ZenCart, or something with my web host (HostGator).

    So why can't I get my CSS and JS files compressed?

    Insight would be appreciated...

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    You problem isn't with Zen Cart :) guess what that leaves ...
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Feb 2008
    Posts
    118
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    I figured as much, but I don't understand why...
    HostGator is a very open system, they allow quite a bit and seem to have everything I've needed so far (particularly with ZC), already setup.

    Why would they disallow gzip compression on CSS and JC files?
    For that matter, why doesn't ZenCart's use of the gzip function include this feature already?

    Ultimately, why would anyone NOT want to compress these files?
    All I'm trying to do is get my site running faster...which is something that everyone should want.

  4. #4
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    Compressing CSS files is not something in Zen Cart's control. They're served directly from the webserver.

    How big is your CSS that it matters?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    199
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    Hi Kim,

    on a site I'm working over (Lida took a look at it too), the 'gzipping' of css and js would just give an help to improve performances, not so great alone, but you know one byte here one there, putting all together (and multiplying for the 'first-access' visitors), there would be benefit both for the visitors and for the server load and bandwidth consumption.

    So, is there a side effect causing to prefer not to gzip css and js files?

    In the example above, total size of js is 131Kb and css is 194Kb (ok there will be some work to optimize both js and css, but gzipping 'em would be a benefit aswell, or not?)
    Paolo De Dionigi
    Co-maintainer of Zen Cart Italia

  6. #6
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    194Kb
    For CSS? It is all text! That needs more than just some compression - it needs cleaning. Remove anything that isn't being used, learn the CSS shortcuts and put each declaration on one line.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  7. #7
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    199
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    Quote Originally Posted by Kim View Post
    For CSS? It is all text! That needs more than just some compression - it needs cleaning. Remove anything that isn't being used, learn the CSS shortcuts and put each declaration on one line.
    Yeah Kim, I know. I'm preparing a relation on what must be done and then I'll give it to the client (and we'll see who'll take care to adjust things, me or who created the site...).

    Other than cleaning, shortcuts and one row declarations, there's also one stylesheet_old.css (funny eh?)

    Not speaking about prototype and scriptaculous (not yet understood why are there...) not minified...

    Not speaking about png images not optimized and so on.


    Well, this said, again the question: is there a reason for which is better not to gzip js and css files? (the only one I know of would be cpu usage, but I believe that having a problem with cpu usage from using gzip is very hard). More: actually gzip should compress just the only one html file present in Zen Cart, so if it is worth for the html file surely will be also for css and js.

    Bye
    Paolo De Dionigi
    Co-maintainer of Zen Cart Italia

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: gzip, minify, smartoptimizer & htaccess...

    Your real problem is not likely how fast the files are downloaded. It's likely either a result of a slow connection or server and/or the sheer size of the files.

    You can probably gzip the css and js files without adverse side-effects ... if you can figure out how. That's a function of your webserver, not Zen Cart.

    If you're referring to gzip compression provided by PHP (which Zen Cart uses), then in order to cause the compression, you have to serve the files via PHP, instead of as direct files that are loaded and cached by the browser. Thus, you'd have to completely change how you deliver your content.

    If you're simply referring to compacting your CSS by removing spaces and line-breaks in the physical files that are downloaded by the browser, there are various tools available to assist with that after you've optimized the file content by removing anything that's not needed.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    199
    Plugin Contributions
    0

    Default Re: gzip, minify, smartoptimizer & htaccess...

    Quote Originally Posted by DrByte View Post
    Your real problem is not likely how fast the files are downloaded. It's likely either a result of a slow connection or server and/or the sheer size of the files.

    You can probably gzip the css and js files without adverse side-effects ... if you can figure out how. That's a function of your webserver, not Zen Cart.

    If you're referring to gzip compression provided by PHP (which Zen Cart uses), then in order to cause the compression, you have to serve the files via PHP, instead of as direct files that are loaded and cached by the browser. Thus, you'd have to completely change how you deliver your content.

    If you're simply referring to compacting your CSS by removing spaces and line-breaks in the physical files that are downloaded by the browser, there are various tools available to assist with that after you've optimized the file content by removing anything that's not needed.
    Oh, well! I was speaking in general, since I know that the main problem of the site I referred is related to the server (at 90%).

    What I was looking for (since I never worried about gzip before) was what you said: the need to serve those files via PHP, so the need to change a lot.

    At this point I may see that it's not worth it!

    Thanks Doc!


    I hope not going OT with next question, since is performances related aswell.

    Do you know how to understand if the (quite big) number of HTTP_REQUESTS is really a problem, so it's worth to try to reduce them and to set (very carefully) the header: expires, to remove most of them after the first visit?

    Since for pages after the first, the heavy of files is not a problem since with gzip and cache, less than 10Kb are downloaded for each page (without new images of course) (but there are still all the HTTP_REQUESTS of course).

    Thanks
    Paolo De Dionigi
    Co-maintainer of Zen Cart Italia

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: gzip, minify, smartoptimizer & htaccess...

    Quote Originally Posted by s_p_ike View Post
    I hope not going OT with next question, since is performances related aswell.

    Do you know how to understand if the (quite big) number of HTTP_REQUESTS is really a problem, so it's worth to try to reduce them and to set (very carefully) the header: expires, to remove most of them after the first visit?

    Since for pages after the first, the heavy of files is not a problem since with gzip and cache, less than 10Kb are downloaded for each page (without new images of course) (but there are still all the HTTP_REQUESTS of course).
    I'm not sure I fully understand your question.
    But, if your server is performing slowly, I'd suggest focusing on the server rather than the number of hits.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How can I speed up my site?
    By boby in forum General Questions
    Replies: 1
    Last Post: 30 Dec 2014, 06:19 AM
  2. v139h Speed up the Back end Orders speed and DB Size questions
    By explorer1979 in forum General Questions
    Replies: 0
    Last Post: 28 Aug 2012, 02:40 AM
  3. Site Speed...my code or my server?
    By Beama in forum General Questions
    Replies: 4
    Last Post: 5 Sep 2009, 01:21 AM
  4. How to speed my site?
    By Mikado in forum General Questions
    Replies: 6
    Last Post: 16 Dec 2007, 12:26 PM
  5. Speed of Site and Admin
    By LadyBubs in forum Basic Configuration
    Replies: 8
    Last Post: 22 Jan 2007, 03:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR