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.


14108 posts

Uber Geek
+1 received by user: 2526

Trusted
Subscriber

Topic # 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.




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


Create new topic
1991 posts

Uber Geek
+1 received by user: 751

Trusted

  Reply # 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?




It looks like I'm using an adblocker. I should consider whitelisting Geekzone in my adblocker or a subscription. The Quick Reply box will appear for me when Geekzone is whitelisted. Hooray for me! If I want to reply to this topic I should click on Compose Reply.




14108 posts

Uber Geek
+1 received by user: 2526

Trusted
Subscriber

  Reply # 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.




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


6323 posts

Uber Geek
+1 received by user: 390

Moderator
Trusted
Lifetime subscriber

  Reply # 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.



14108 posts

Uber Geek
+1 received by user: 2526

Trusted
Subscriber

  Reply # 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.




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


8027 posts

Uber Geek
+1 received by user: 387

Trusted
Subscriber

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

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



14108 posts

Uber Geek
+1 received by user: 2526

Trusted
Subscriber

  Reply # 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.




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


8027 posts

Uber Geek
+1 received by user: 387

Trusted
Subscriber

  Reply # 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

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



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.

Alternatively, you can receive a daily email with Geekzone updates.