Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

Avoiding CSS @ import for Affilotheme

87.evanlim
Posts: 13
Joined: 30 May 12
Trust:

Avoiding CSS @ import for Affilotheme

Hi all,

I am trying to make my website faster by eliminating issues using google developer tools for speedtest

One of the issue they recommend is to

"Avoid CSS @ import" for my website and it says

"Using CSS @import in an external stylesheet can add additional delays during the loading of a web page."

So the question is, because im using Affilotheme and using Massive theme for my webpage, is there a way to have an internal stylesheet instead of an external stylesheet?

Can anyone help me with this? Thanks!
  • 0
Evan
 
PremiumMember
jimcoe
Posts: 259
Joined: 13 Feb 12
Trust:
I don't think what Google is saying applies to WordPress (but I'm not positive). I believe it's for traditional static pages.

The best method I've found of speeding up WordPress (besides keeping all images down to 30KB to 40KB in file size) is the "Use Google Libraries" WordPress plugin. In WordPress, the external JavaScript libraries are slower than the CSS. This plugin gets those libraries from Google's ultra-fast servers, rather than from your hosting service's server.

I use the page load speed test at http://tools.pingdom.com/fpt/ it's very fast and convenient. I recommend averaging at least 5 tests. And look carefully at what's slowing things down the most - they have excellent corrective info.

Hope this helps...
_jim coe
  • 0
87.evanlim
Posts: 13
Joined: 30 May 12
Trust:
I have loaded my webpage in google's speedtest and the response i believe talks specifically about my site.

I already have google libraries plug in before i ran the query .

Thanks for the link Jim. I gave it a go but find it hard to implement what is bottlenecking my site.

Still trying to learn how to not import CSS :P
  • 0
Evan
 
PremiumMember
jimcoe
Posts: 259
Joined: 13 Feb 12
Trust:
If you're sure they mean WordPress, maybe you should also ask on the WordPress forum? It has a huge membership and lots of WP experts.

_jim coe
  • 0
87.evanlim
Posts: 13
Joined: 30 May 12
Trust:
Thanks, will try there :)
  • 0
Evan
 
aratesic
Posts: 15
Joined: 17 May 12
Trust:
You can change that, but you'll have to pull up the theme editor, delete the @import functions, and write link tags instead. I did not find a plugin that does it for you, so it's manual work.

Of course, you risk breaking the theme, so if you are not confident about it, don't do it or make a back up before saving any changes.

Anyway, here is a link that tells you how to change @import to link tags if you want to do it.

http://gtmetrix.com/avoid-css-import.html

Remember to back up the default before making any changes to the code.
  • 1
"There are three types of people in this world. Those who can count, and those who can't." -ToonHole comic
 
PremiumMember
jimcoe
Posts: 259
Joined: 13 Feb 12
Trust:
Also remember that when you next update the theme, typically all your theme edits will be overwritten. The way to avoid this, while still getting the benefits of updates, is to create a "Child Theme" of the theme and make your changes in that.

Do a search at www.WordPress.org on "child theme" to see how.

Hope this helps....
_jim coe
  • 1
87.evanlim
Posts: 13
Joined: 30 May 12
Trust:
aratesic wrote:You can change that, but you'll have to pull up the theme editor, delete the @import functions, and write link tags instead. I did not find a plugin that does it for you, so it's manual work.

Of course, you risk breaking the theme, so if you are not confident about it, don't do it or make a back up before saving any changes.



Thanks for the info. Do you mind telling me where the theme editor is?
  • 0
Evan
 
87.evanlim
Posts: 13
Joined: 30 May 12
Trust:
jimcoe wrote:Also remember that when you next update the theme, typically all your theme edits will be overwritten. The way to avoid this, while still getting the benefits of updates, is to create a "Child Theme" of the theme and make your changes in that.


When you mean update the theme, are you talking if i change theme using the theme editor?
  • 0
Evan
 
aratesic
Posts: 15
Joined: 17 May 12
Trust:
Click on Appearance in your WP dashboard (or just roll over it with your mouse) and click on Editor.

@jimcoe: Thanks for mentioning the child theme. I completely forgot about the updates...

What he means is that Affilorama will update the Affilotheme eventually. If you make any changes to the existing theme in the theme editor, you will probably overwrite it when you install the next update from Affilorama.

I say probably because Affilotheme v4 is already a parent theme with several child themes, so I am not sure how they will behave when you update their parent theme.
  • 0
"There are three types of people in this world. Those who can count, and those who can't." -ToonHole comic
 
87.evanlim
Posts: 13
Joined: 30 May 12
Trust:
Thats really great information. Thanks guys. Will give it a try and update. Hopefully this could help others too!
  • 0
Evan
 

This topic was started on Aug 13, 2012 and has been closed due to inactivity. If you want to discuss this topic further, please create a new forum topic.