Title: Remove HTML Trailing Slash When Creating Cache
Last modified: May 18, 2023

---

# Remove HTML Trailing Slash When Creating Cache

 *  Resolved [arfanzr77](https://wordpress.org/support/users/arfanzr77/)
 * (@arfanzr77)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/)
 * Can I remove trailing slash ( /> ) when Fastest Cache Minifying HTML ?
 * Because when I Check W3C Validator i got some info like this :
 * **Trailing slash on void elements **has no effect** and **interacts badly with
   unquoted attribute values**.**

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

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16754109)
 * can you explain more please? do you think that wp fastest cache adds trailing
   slash?
 *  Thread Starter [arfanzr77](https://wordpress.org/support/users/arfanzr77/)
 * (@arfanzr77)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16756005)
 * No.. WP Fastest Cache working normally.. But I Want add some function to remove
   trailing slash… I Know that this plugin can rewrite html code when minify html..
 *     ```wp-block-code
       <meta property="og:type" content="website" />
       to 
       <meta property="og:type" content="website">
       ```
   
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16756830)
 * you can modify the html source of cache by our hook system.
   [https://www.wpfastestcache.com/tutorial/buffer-callback-filter/](https://www.wpfastestcache.com/tutorial/buffer-callback-filter/)
   if you want, I can write the code for you.
    -  This reply was modified 3 years ago by [Emre Vona](https://wordpress.org/support/users/emrevona/).
 *  Thread Starter [arfanzr77](https://wordpress.org/support/users/arfanzr77/)
 * (@arfanzr77)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16758326)
 * Yes, Can you make the filter snippet for me.. I am newbie..
 * I dont know how to use it for removing trailing slash..
 *     ```wp-block-code
       add_filter( 'wpfc_buffer_callback_filter', 'your_function_name', 10, 3);function your_function_name($buffer, $extension, $cache_file_path){// Your codereturn $buffer;}
       ```
   
 * Thanks [@emrevona](https://wordpress.org/support/users/emrevona/) for making 
   a great plugin..
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16758335)
 * I will write and let you know.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16758975)
 * I wrote the code but you need to delete wp fastest cache and install the following
   version to get the latest changes because I had to modify the source code of 
   wp fastest cache.
   [https://downloads.wordpress.org/plugin/wp-fastest-cache.zip](https://downloads.wordpress.org/plugin/wp-fastest-cache.zip)
   After the first step, you can start to use the code which solved the [**Trailing Slash on Void Elements**](https://www.wpfastestcache.com/tutorial/buffer-callback-filter/#how-to-remove-trailing-slash-on-void-elements)
   warning.
 *  Thread Starter [arfanzr77](https://wordpress.org/support/users/arfanzr77/)
 * (@arfanzr77)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16762012)
 * PERFECT… It work like a charm.. Thanks [@emrevona](https://wordpress.org/support/users/emrevona/)
   for your time.
 * Now, I have found no errors and warning in W3C Validator. Nice..
 * [https://validator.w3.org/nu/?doc=https%3A%2F%2Fjasapasang.net%2F10-problem-pada-cctv-dan-cara-mengatasinya%2F](https://validator.w3.org/nu/?doc=https%3A%2F%2Fjasapasang.net%2F10-problem-pada-cctv-dan-cara-mengatasinya%2F)
 * Thanks very much. So, I want next plugin update, It means I have to keep /inc/
   cache.php? Or is there another file to keep?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16762523)
 * where did you add the code?

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

The topic ‘Remove HTML Trailing Slash When Creating Cache’ is closed to new replies.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/remove-html-trailing-slash-when-creating-cache/#post-16762523)
 * Status: resolved