Combine scripts for SEO

Forums Forums Menus Combine scripts for SEO

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #421
    Davidrad
    Member

    Thanks for a great plugin.

    Is there a safe way to combine the scripts that multi-menu embeds in head, e.g. link to bare scripts and place them on bottom of page or cache them somewhere? I’m trying to optimize my WordPress site, remove extra php calls, combine css files, etc.

    Thanks

    #4005

    Hi,
    I’m not sure that moving them to the bottom of the page would be helpful SEO wise. It is certainly doable though.

    The PHP calls aren’t really a problem, but the fact that the plugin hits your database multiple times will add a slight load to your server. To get around this you just need to manually add the HTML for the various scripts etc. to your theme. Then add the PHP scripts which manually generate the menu to your theme as well, or you could just add the raw HTML if you don’t need them to be dynamically generated from WordPress.

    An easier solution would be to use a caching plugin like WP Super Cache. Then the pages will be served from raw HTML anyway and you won’t need to worry about modifying any plugins, scripts etc. as the plugin will effectively be optomising everything for you.

    #4006
    Davidrad
    Member

    Thanks Ryan. I’ll need to do some house cleaning. One of biggest issues with WordPress plug-ins (in general) is that they embed their own scripts into the HEAD of every page regardless of whether their widget/plug-in is being used on that page.

    Before you know it, there are a half dozen extra lines of coding in the HEAD and just as many calls.

    Thanks again for a fantastic script!

    #4007

    Yeah, there are a lot of plugins which do that.

    I don’t think is any way I could remove any more code from the theme though.

    The Superfish plugin and associated scripts are all of the shelf scripts which I don’t want to go messing with, so they’re all stored in their seperate files as provided by the original creators.

    The Suckerfish script is also external and held in IE conditional comments to serve it only to IE6 and older browsers.

    The CSS itself can be moved anywhere you like. You can deactivate the built in style.php file (where the CSS is stored by default) via the advanced option in the plugins settings page.

    If you can think of any way I can reduce the code clutter in your pages, then let me know. The reason I created this plugin was due to the only alternative available when I made this having appaling accessibility support and poor on page coding so if there is anything I can do to improve on that then I’m definitely keen to hear about it.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.