Remove query strings from static resources

Hi,

Thank you for the great theme that has Estonian language support.
Please help to remove query strings from static resources
http://hingetee.ee/wp-content/themes/sparkling/inc/fonts/fontawesome-webfont.woff2?v=4.6.3
W3 Total Cache plugin makes it like that.

Thank you,
Marko

Hi Marko,

I hope you are well today and thank you for your question.

Please try removing it ausing this plugin: Remove Query Strings From Static Resources – WordPress plugin | WordPress.org

Best Regards,
Vinod Dalvi

Hi,

  1. First solution:

If this option is selected then, try to unselect it and it will prevent the query string from resources.

  1. If that didn’t work, Try this code in your child theme’s functions.php
function remove_cssjs_ver( $src ) {
 if( strpos( $src, '?ver=' ) )
 $src = remove_query_arg( 'ver', $src );
 return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
  1. If you don’t want to get your hands on dirt with code means, use plugins like this, Remove Query Strings From Static Resources – WordPress plugin | WordPress.org

Let us know,

Thanks,
laranz.

Hi Laranz,

It did not work. I alredy had remove-query-strings-from-static-resources plugin and setting in the w3 total cache like in the picture (unselected). Added also code to the child theme. I hope it is possible to find solution to this :).

Best regards,
Marko

Hi Vinod,

I already have remove-query-strings-from-static-resources plugin and if i disable it then we have more query strings do deal with :slight_smile:

Best regards,
Marko

I visited your shared site http://hingetee.ee/ but didn’t see the query string in the source code of it.

From where are you getting this query string added link?

Could you please share the screenshot of it?

Hi Movin,

Pingdom website speed test shows this and it adds 70.7 kB to the site.

Thank you,
Marko

Hi,

You can either visit this page, wp-content/themes/sparkling/inc/css/font-awesome.css and wp-content/themes/sparkling/inc/css/font-awesome-min.css and remove the query string by hand, it will do the trick.

Let us know,

Thanks,
laranz.

Hi Laranz,

I made backup form original css files and removed these lines from both files:
, url(’…/fonts/fontawesome-webfont.woff2?v=4.6.3’) format(‘woff2’)

http://hingetee.ee/wp-content/themes/sparkling/inc/css/font-awesome.css
http://hingetee.ee/wp-content/themes/sparkling/inc/css/font-awesome.min.css

Now front page size got bigger from 601.9 to 619.9kb and same query string is till there.
Maybe i miss something or it was not the correct line to remove. Fix still needed :).

I soon try to disable all plugins and then enable w3 total chache and remove-query-strings-from-static-resources plugin only and see if it is still there. Maybe some other plugin makes w3 total chache act like that or if it is not possible to do with w3 total chache and i have to choose other chache plugin :slight_smile:

Thank you all,
Marko Veide

Hi again

It went to the next webfont files and added it to the page. I removed other webfonts 4.6.3 urls also and now it seems ok.
Does Font Awesome Disable plugins exist?

Please help to remove unneeded code from these font awesome files or it is safe do delete these files completely? :slight_smile:
http://hingetee.ee/wp-content/themes/sparkling/inc/css/font-awesome.css
http://hingetee.ee/wp-content/themes/sparkling/inc/css/font-awesome.min.css

Thank you all,
Marko Veide

Hi again,

Now the go up button is like in the added picture if i do not upload backup back. Font Awesome is needed for that in sparkling theme?

If we get fix for go up button then is it possible to move theme changes to sparkling child theme so after update it stays like that?

Hi,

Yes fontawesome is need for the theme icons, I suggest you to use that. Also, still the css file shown with the query string, both the http://hingetee.ee/wp-content/themes/sparkling/inc/css/font-awesome.css and the min.css file. Please try disable/clear the cache, and it will solve the issue.

Let us know,

Thanks,
laranz.

Hi,

I removed w3 total chache and installed wp fastest chache and it removed that issue.

Thank you,
Marko

You are always welcome here :slight_smile: