Title: Eliminar recursos JavaScript
Last modified: August 15, 2020

---

# Eliminar recursos JavaScript

 *  [franchi](https://wordpress.org/support/users/franchi/)
 * (@franchi)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/eliminar-recursos-javascript/)
 * Hola,
    He estado viendo la velocidad de mi web en PageSpeed Insights y me recomienda
   eliminar javaScript que no estoy utilizando. Si alguien me pudiera dar consejo
   como eliminarlo sin dañar nada más o si existe algún plugin que lo haga sería
   de gran ayuda. La web es prismaticos.org y lo he pasado por [https://developers.google.com/speed/pagespeed/insights/](https://developers.google.com/speed/pagespeed/insights/)
   Muchas gracias de antemano.
    -  This topic was modified 5 years, 9 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Feliminar-recursos-javascript%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/eliminar-recursos-javascript/#post-13259603)
 * No plugin can know if a particular page needs a particular script or not. You’ll
   need to decide for yourself. It’s not unusual for plugins to load their script
   for all pages even though it’s only needed for a few because the plugin cannot
   know if its script is needed or not. The Contact Form 7 script is a good example.
   It’s only needed on pages that have a contact form, yet the script appears on
   all pages.
 * Plugins should be adding scripts with `wp_enqueue_script()`. If they do and you
   can find the code where they do this, you can dequeue the same script in a later
   action hook if it’s not needed for the requested page.
    [https://developer.wordpress.org/reference/functions/wp_dequeue_style/](https://developer.wordpress.org/reference/functions/wp_dequeue_style/)
 * You can determine the requested page’s ID with `get_queried_object_id()`. If 
   the ID is not in a list of IDs which need the script, dequeue the script. Getting
   the queried object ID will not work for archive type pages which list multiple
   posts. You can check if the request is for such a page with `is_archive()`.

Viewing 1 replies (of 1 total)

The topic ‘Eliminar recursos JavaScript’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/eliminar-recursos-javascript/#post-13259603)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
