WordPress.org

Ready to get started?Download WordPress

Forums

WPSocialite
[resolved] CSS and perfomance issues (6 posts)

  1. RA_NPL
    Member
    Posted 1 year ago #

    Hi Tom,

    thank you for your great work on this plugin. I am very happy with the recent speed increase of my site http://www.ra-plutte.de. Still I have three little issues.

    1. When checking page's speed on tools.pingdom.com, it shows two minor performance problems with relation to wpsocialite. You may be wanting to use the tools.pingdom.com server in the netherlands, as my site is located in germany. Here are the logs:

    - Serve the following static resources from a domain that doesn't set cookies:

    http://www.ra-plutte.de/wp-content/plugins/wpsocialite/lib/custom-default.png

    - Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:

    http://www.ra-plutte.de/wp-content/plugins/wpsocialite/lib/wpsocialite.css?ver=3.5

    Do you any suggestions on how to solve this?

    2. I would like to shift all styles from /wp-content/plugins/wpsocialite/lib/wpsocialite.css to my main style.css due to performance best practise. But if I simply copy & paste all code to my style.css, tools.pingdom.com returns a 404 error. What do you recommend, especially keeping in mind future plugin updates?

    3. On http://www.ra-plutte.de the Facebook plugin is not displayed in line with the other plugins when active after hovering. Is it an error on my site or is something wrong with the code?

    Cheers Nick

    http://wordpress.org/extend/plugins/wpsocialite/

  2. Tom
    Member
    Plugin Author

    Posted 1 year ago #

    Nick,

    Appreciate your feedback. Here are my answers:

    1. The first issue with the "custom-default.png" file isn't clear. What error is tools.pingdom.com giving you for this file? Can you possibly link me to the log you are talking about? I ran the test myself but did not find the same errors you did.

    2. In order to remove the ? version number when calling CSS/JS files, you can use the following script in your functions.php:

    add_filter( 'script_loader_src', 'remove_src_version' );
    	add_filter( 'style_loader_src', 'remove_src_version' );
    
    	function remove_src_version ( $src ) {
    
    	  global $wp_version;
    
    	  $version_str = '?ver='.$wp_version;
    	  $version_str_offset = strlen( $src ) - strlen( $version_str );
    
    	  if( substr( $src, $version_str_offset ) == $version_str )
    		return substr( $src, 0, $version_str_offset );
    	  else
    		return $src;
    
    	}

    3. You can incorporate wpsocialite.css into your main CSS file, and there should be no reason for you to get a 404 if you change your CSS. Are you deactivating the style in WPSocialite by adding the following to your wp-config.php (preferably at the top)?

    define( 'WPSOCIALITE_LOADSTYLES', false);

    4. Regarding the facebook like button not being inline with everything else, I believe this is because of the button being translated. If you drill down into the HTML/CSS in a source browser (Chrome Dev Tools or Firebug) you'll find a <span> tag that has a height of 20px. This is automatically being set by facebook. I would target the facebook button on its own and add your own CSS to offset this.

    Hope this helps and be sure to let me know if you are still experiencing any issues.

  3. RA_NPL
    Member
    Posted 1 year ago #

    Hello Tom,

    thanks for your quick support.

    1. After reviewing I think the custom-default.png issue is rather a general problem of my file keeping and not something specific about WPSocialite. Google Page Speed advises to serve static content from a cookieless domain. My server is setting cookies for static content like custom-default.png, so right now I am working on setting up a CDN or a cookieless subdomain (static.ra-plutte.de).

    2. The version code snippet workes great, same as the CSS switch to my main style.css.

    3. Still I am having trouble with the CSS of the FB Button on my webbrowser (firefox) same as on mobile/ipad, where it looks totally screwed both in portrait and landscape mode :/

  4. Tom
    Member
    Plugin Author

    Posted 1 year ago #

    Nick,

    This reply is way to late! So sorry for that.

    Is the facebook box still giving you issues? A number of fixes will be released today, be sure to update and let me know what the results are.

  5. RA_NPL
    Member
    Posted 1 year ago #

    Hi Tom, I got some help in the meantime. Works brilliant now. Thanks for aksing!

  6. Tom
    Member
    Plugin Author

    Posted 1 year ago #

    Not a problem, don't hesitate to follow up with any other issues/feature requests.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic