Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

css, javascript and optimization


  #1  
Old Jan 31, 2014, 09:28 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
css, javascript and optimization

This isn't a plugin question but I didn't know where else to ask it. Basically, I am wondering whether I should make my css and js inline or make it an external file? I've been having server load spikes lately, usually when the site gets a lot of traffic. They seem to be related to mysql queries, but I'm not sure. When this happens, pages are taking 10-30 seconds to load, and occasionally people get a timeout error.

So I'm trying to optimize the site, particularly I'd like to reduce mysql queries. I'm assuming that when you make your js and css inline, that this adds two more mysql queries for each page load. Is this correct? And by making it an external file, it does not need to query the database.

I would appreciate anyone's expertise on this issue, aside from my basic question above. Here's the site, if you are interested in seeing it.

http://www.popularresistance.org

Thanks!
Emanuel
__________________
Emanuel
http://www.sferios.com

Last edited by lmilesw; Feb 2, 2014 at 08:17 AM.
  #2  
Old Feb 1, 2014, 03:56 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Atahualpa reads ALL it's options from the datbase in one query. WordPress will do one query per post. You have 23 posts on your front page so that brings you up to 24 queries. I have no idea how many he header plugin will make or the sidebar widgets.

If you make your CSS/java script external, you will get an extra two requests the first time someone goes to the site which will grab those files and put them in local storage. Subsequent page visits will get less data (the number of bytes in the CSS and Javascript files) so response will be a little longer for the first page and a little shorter when the viewer clickes to an article etc.

do a google search 'wordpress performance' and it looks like you don't have a caching plgin active…why not?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Feb 1, 2014 at 03:58 AM.
  #3  
Old Feb 1, 2014, 09:22 AM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Thanks JD,

We are using the Cloudflare CDN. Doesn't that do what a caching plugin is supposed to do? If not, and you think we can benefit from one, which one do you recommend?

Also, how long does the css/js file stay in storage in the visitor's local browser after they first come to the site? Is it over 24 hours? If someone comes back the next day, for example, will they still be there?

Also, our click rate is 1.7, which means 70% of our clicks occur after someone has arrived for the first time (I think).
__________________
Emanuel
http://www.sferios.com

Last edited by emanuel1969; Feb 1, 2014 at 09:27 AM.
  #4  
Old Feb 1, 2014, 12:39 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
As I understand it, a cdn just spreads your media around so multiple requests for the files can process at the same time. A caching plugin will build a page the first time it is visited and store the prebuilt html in a cache so when the next person comes along, no database queries are needed because the page is already built.

As for which to use, you have to test a couple and see which is best for you in your environment. My sites so low activity I don't use one.

Generally there is a settings to control when the cache will expire
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by lmilesw; Feb 2, 2014 at 08:17 AM.
  #5  
Old Feb 1, 2014, 04:06 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Thanks. This is helpful. I'll check out W3 Total Cache.
__________________
Emanuel
http://www.sferios.com
  #6  
Old Feb 2, 2014, 08:36 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
You might want to check out some of the latest reviews for W3 Total Cache. There are several other caching plugins you should probably check out.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Feb 27, 2014, 02:12 AM
andrikaa
 
1 posts · Feb 2014
Hello, whenever I try to open anything with Javascript, it will not open. When I click on it nothing happens, it just says Javascript and then whatever page I am on at the bottom left. Do you have any idea what this could be? I have the latest version of Java and everything is enabled. Thank you.
  #8  
Old Feb 27, 2014, 07:07 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
@andrikaa - please see this thread
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to properly add Javascript?!? --- HELP! basslover911 Atahualpa 3 Wordpress theme 2 Dec 25, 2012 08:16 AM
Atahualpa performance optimization using w3 cache and CDN networks everyman Plugins & Atahualpa 6 Oct 28, 2012 12:50 AM
Javascript Countdown bvimusic Atahualpa 3 Wordpress theme 1 Sep 12, 2011 02:37 PM
Linking & SEO Optimization cliffbird Post-Kicker, -Byline & -Footer 0 Aug 20, 2010 09:50 AM


All times are GMT -6. The time now is 04:39 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.