latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Static Load JS and CSS

Home Forums Community Forum Static Load JS and CSS

Tagged: ,

This topic contains 3 replies, has 2 voices. Last updated by  TJ 3 years, 3 months ago.

Topic Author Topic
Posted: Friday Sep 13th, 2013 at 12:07 pm #59539

Hello!
I have searched extensibly for a way to improve the s2member-o.php load times. Let me tell you that it’s incredible that you guys are loading css and js dyamically through wordpress, and that you have known this is a customer ask for years now. Your product is great, but I can’t grow with it if this is not possible.

Have you found a solution? All past forums date from 2011 and 2012 (see below).

I WANT to load the s2member css and jss statically to speed up (and not have to use the wordpress lag).

http://www.primothemes.com/forums/viewtopic.php?t=14359&p=32934#p33441

http://www.s2member.com/forums/topic/remove-css-and-optimize-js/

http://www.s2member.com/forums/topic/can-i-optimize-the-speed-of-s2member/

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Friday Sep 13th, 2013 at 8:21 pm #59549
TJ
Username: wellwater

I too would prefer to have s2member’s files load statically instead of dynamically. But until that’s done, perhaps the following could help:

When I began using s2member it took some time to optimize things so .css and .js affected load time as little as possible. The things I did that made a difference was the following:

1) Move all JavaScript loading from the head tag to the footer. This will allow the page to render, without JavaScript blocking page load. This was probably the most critical thing of all, in terms of perceived rendering/load from a user’s perspective.

2) Use a cache plugin. This is a must. I’ve used W3TC, WP Super Cache, and Quick Cache. I prefer the 3rd due to its simplicity.

3) Don’t load s2Member’s CSS. This may not be practical for all users, but since I only needed to style the checkout form, I disabled s2Member’s CSS and just recreated the CSS styles in my main stylesheet.

4) Only load s2Member on pages that need it. If you have 100 pages, but only 1 or 2 has a checkout form, then just load s2Member’s code on those 1 or 2 pages.

5) Use a CDN to offload images, scripts, css, such as Amazon CloudFront or MaxCDN.

Another thing you’ll want to do, if you haven’t, is test your site on:
http://www.webpagetest.org/

It’ll tell you where some bottlenecks are with recommendations of what you can do to resolve them.

The WebPageTest.org site was critical for me to find out problems with the site that didn’t even have anything to do with s2Member. For instance, it detected a legacy Keep-Alive Apache problem on SSL pages that had to be corrected. It was affecting all IE users by closing connections after each asset request.

  • This reply was modified 3 years, 3 months ago by  TJ.
Posted: Saturday Sep 14th, 2013 at 12:25 pm #59572

Thanks for the answer TJ. I’ve already tried most of those items (they are well documented in the posts I referenced).

For reference, my site is loading in 3.3 seconds and the s2member-o.php processes are taking a 1.3 seconds!!! It’s insane. Very bad design on your end to be loading dynamically vs statically.

Think about it. Folks with this problem are typically your customers that their sites are getting a lot of traction, and need performance. You could even charge more for this!!!

Anyway, could you elaborate on option 4? Is that by using Plugin Organizer? Is the s2member-o.php css and js only needed for Pro Forms?

Thanks!

Posted: Saturday Sep 14th, 2013 at 3:23 pm #59575
TJ
Username: wellwater

I wrote a post a few days ago that detailed conditional loading:
http://www.s2member.com/forums/topic/s2member-slowing-site-down/#post-59167

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.