Title: Reduce HTTP Calls&#8230;
Last modified: August 31, 2016

---

# Reduce HTTP Calls…

 *  Resolved [LaserDiscMovies](https://wordpress.org/support/users/laserdiscmovies/)
 * (@laserdiscmovies)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/reduce-http-calls/)
 * Just wondered if you could make a suggestion.
 * I am trying to decrease the page loading time of my daughters WordPress website
   by minimizing HTTP requests. Therefore, I am only loading css and js files on
   a per page basis.
 * In reviewing your wp-forecast.php file I found:
    add_action(‘wp_enqueue_scripts’,‘
   wp_forecast_css’);
 * So I wrote the following code for the functions.php file
 * function wpcustom_deregister_scripts_and_styles(){
    if (is_page(array(‘about’,‘
   photo-gallery’, ‘adventure-map’, ‘background’, ‘contact’))) { wp_deregister_script(‘
   wp_forecast_css’); } } add_action( ‘wp_print_styles’, ‘wpcustom_deregister_scripts_and_styles’,
   100 );
 * This function does work for other styles/scripts but not yours. I thought that
   perhaps it was because the css was being enqueued by a script as opposed to (
   I think) correctly by a style enqueue.
 * Anyway, do you know how to correctly unenqueue ‘wp_forecast_css’ which will then
   not load wp-forecast-default.css ?
 * Let me know if you have any questions.
 * [https://wordpress.org/plugins/wp-forecast/](https://wordpress.org/plugins/wp-forecast/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [tuxlog](https://wordpress.org/support/users/tuxlog/)
 * (@tuxlog)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/reduce-http-calls/#post-7075859)
 * Hello,
 * yes, please use remove_action.
    [https://codex.wordpress.org/Function_Reference/remove_action](https://codex.wordpress.org/Function_Reference/remove_action)
 * I tihnk there was a reason to use a script enqueue and not a style enqueue. Will
   have a look at it with the next release.

Viewing 1 replies (of 1 total)

The topic ‘Reduce HTTP Calls…’ is closed to new replies.

 * ![](https://ps.w.org/wp-forecast/assets/icon-128x128.png?rev=1515240)
 * [wp-forecast](https://wordpress.org/plugins/wp-forecast/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-forecast/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-forecast/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-forecast/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-forecast/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-forecast/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [tuxlog](https://wordpress.org/support/users/tuxlog/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/reduce-http-calls/#post-7075859)
 * Status: resolved