WordPress.org

Forums

JQuery Mega Menu Widget
[resolved] load time issues due to skin.php (3 posts)

  1. bheadrick
    Member
    Posted 2 years ago #

    What's the purpose of using skin.php to load the css vs using conditional enqueue? The skin.php seems to take way more time to load than if the actual css file were directly referenced.

    http://wordpress.org/extend/plugins/jquery-mega-menu/

  2. bheadrick
    Member
    Posted 2 years ago #

    I've noticed that having the dynamic css get generated each time a page loads on my site causes it to take an extra 300ms or so to load. I've figured out a great way to get around that. First, create a .htaccess file and add it to the mega-menu plugin folder. Add this to the .htaccess file:

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /wp-content/plugins/jquery-mega-menu

    RewriteRule ^([^/]+)-([^/]+)\.css$ skin.php?widget_id=$1&skin=$2 [NC]
    </ifmodule>

    Next, if you change your reference to the skin, you can include it so it looks something like this: (for widget_id#2 and using the "white" skin)
    wp-content/plugins/jquery-mega-menu/2-white.css

    This way, it looks like an actual file, and it can be cached as well as picked up by a cdn

  3. remix4
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    It is required to allow multiple menus per page with different skins. You can also select the "no skin" option and copy the styling to your theme's css which is much faster

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • JQuery Mega Menu Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.