Title: javascript on all pages
Last modified: August 20, 2016

---

# javascript on all pages

 *  Resolved [Pepperbase](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/)
 * 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://wordpress.org/extend/plugins/leaflet-maps-marker/](http://wordpress.org/extend/plugins/leaflet-maps-marker/)

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

 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231898)
 * 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://wordpress.org/support/view/plugin-reviews/leaflet-maps-marker](http://wordpress.org/support/view/plugin-reviews/leaflet-maps-marker)
   😉
 *  Thread Starter [Pepperbase](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231904)
 * 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](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231905)
 * Already found it: leafletmapsmarker
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231911)
 * 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
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231915)
 * 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](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231916)
 * 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](https://wordpress.org/support/users/pepperbase/)
 * (@pepperbase)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231917)
 * Are you going to do the same with the style sheet? Only add the css file when
   a shortcode is included?
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231918)
 * 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.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 8 replies
 * 2 participants
 * Last reply from: [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/javascript-on-all-pages/#post-3231918)
 * Status: resolved