Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bheadrick

    (@bheadrick)

    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

    Plugin Author remix4

    (@remix4)

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: JQuery Mega Menu Widget] load time issues due to skin.php’ is closed to new replies.