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.