Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


timmmay

20883 posts

Uber Geek
+1 received by user: 5365

Trusted
Lifetime subscriber

#87459 29-Jul-2011 13:19
Send private message

I have a wordpress website for my business, with a nice theme on it. That theme references a dozen javascript files, and half a dozen css files. That's obviously a bit slow, and google takes page load speed into account these days, so faster = better rankings.

I'd like to combine and minify all the js files, and all the css files, but when I do that the pages don't load properly. My css slide show disappears, my menu style disappears.

What causes this? Is there any good way to make it work properly? I've resorted to manual trial and error, and i've managed to combine some of the files together, but if I could reduce it even more that'd be good.

Create new topic
muppet
2653 posts

Uber Geek
+1 received by user: 1675

Trusted

  #499413 29-Jul-2011 13:37
Send private message

What are you using to compress them?

Something like this: http://www.lotterypost.com/css-compress.aspx

Or doing it manually?

It can be a bit trial and error sometimes - I'm not enough of a guru to know exactly what causes the issues. Is there not a native module for Wordpress that can automate the procedure for you, wp-cache or something?




Audiophiles are such twits! They buy such pointless stuff: Gold plated cables, $2000 power cords. Idiots.

 

OOOHHHH HYPERFIBRE!




timmmay

20883 posts

Uber Geek
+1 received by user: 5365

Trusted
Lifetime subscriber

  #499415 29-Jul-2011 13:42
Send private message

I use w3 total cache. It can pull them all together for me, but it breaks the site appearance. I end up combining files manually. The minify/compression step it does for me.

nate
6473 posts

Uber Geek
+1 received by user: 458

Retired Mod
Trusted
Lifetime subscriber

  #499417 29-Jul-2011 13:44
Send private message

I find WordPress really runs like a dog on any shared hosting.  Really needs to be on its own box, or something with very little load.



timmmay

20883 posts

Uber Geek
+1 received by user: 5365

Trusted
Lifetime subscriber

  #499419 29-Jul-2011 13:51
Send private message

It probably runs better on dedicated hosting, but 3 second page for a complete page load on shared hosting for $10 a month beats $150 a month for 1.5 seconds IMHO. I could speed it up more by putting it on an NZ server, latency is significant when the browser loads 30 or so files to show the site.

Ragnor
8279 posts

Uber Geek
+1 received by user: 585

Trusted

  #499460 29-Jul-2011 15:07
Send private message

Sounds like a problem with the addon that's doing the combining/minifying.

timmmay

20883 posts

Uber Geek
+1 received by user: 5365

Trusted
Lifetime subscriber

  #499463 29-Jul-2011 15:10
Send private message

Ragnor: Sounds like a problem with the addon that's doing the combining/minifying.


I think it's combining the files fine, I think the issue is the contents of the files are in some way incompatible. Perhaps it's the order of the files (though I keep that the same), perhaps it's file termination, maybe it's where the files need to be referenced from in the html, perhaps its something else. Maybe a better tool would help, I could give that a go, but doing anything manually means hacking the php code which is a pita and makes maintenance more difficult.

 
 
 
 

Shop now on Samsung phones, tablets, TVs and more (affiliate link).
Ragnor
8279 posts

Uber Geek
+1 received by user: 585

Trusted

  #499467 29-Jul-2011 15:14
Send private message

Yeah it all depends what's in the files. They may have definitions that override each other as they were never intended to be used on the same page.

Yes order of files is important too for both css and js. 

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.