• Resolved Pepperbase

    (@pepperbase)


    Hi,

    Great plugin. Using 3.0.

    Was looking at my site’s loading times and saw that the Leaflet Maps Marker is loading JS files on all pages, also those without maps. Is there an option to only include JS on pages where there is actually a map included? Or should I manually deregister the scripts on other pages?

    Thanks.

    http://ww.wp.xz.cn/extend/plugins/leaflet-maps-marker/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,
    currently not possible (yet) to configure this in the plugin as there are some difficulties I couldnt solve yet – I havent found a way yet how to check if my shortcode is used in a content and embedd js+css files afterwards only…
    regards,
    Robert

    PS: as I give support for free, I’d really appreciate a vote for my plugin on http://ww.wp.xz.cn/support/view/plugin-reviews/leaflet-maps-marker 😉

    Thread Starter Pepperbase

    (@pepperbase)

    Hi,

    Good to know you are working on it.

    What are the (register) names of the JS an CSS files? I would like to deregister them manually on pages where I do not use maps.

    Regards.

    Thread Starter Pepperbase

    (@pepperbase)

    Already found it: leafletmapsmarker

    just found a solution (with help from John 😉 to include js in footer only if a shortcode is used 🙂 will be included in v3.1, which will be released in about 1 or 2 weeks probably

    Hi,
    FYI: I just release v3.1 which loads js in footer and only of a shortcode is used
    best regards,
    Robert

    Thread Starter Pepperbase

    (@pepperbase)

    Great that you have got this working now. Hopefully this becomes common practive among all plugin builders.

    Are there more loading time improvements on the roadmap?

    Thread Starter Pepperbase

    (@pepperbase)

    Are you going to do the same with the style sheet? Only add the css file when a shortcode is included?

    I try to follow the kaizen approach – continuos improvements step by step 😉 conditional css inserts are planned for v3.2

    if you have further suggestions how to improve performance, let me know!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘javascript on all pages’ is closed to new replies.