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

  1. bheadrick
    Posted 3 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.


  2. bheadrick
    Posted 3 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]

    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)

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

  3. remix4
    Plugin Author

    Posted 3 years ago #


    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


No tags yet.