WordPress.org

Ready to get started?Download WordPress

Forums

WP Minify
Removing ?m= from the cache url (8 posts)

  1. Yossi Jana
    Member
    Posted 2 years ago #

    How to remove "?m=35253235" from the cache url?
    Can't find the easy way...

    http://wordpress.org/extend/plugins/wp-minify/

  2. Kimberly
    Member
    Posted 2 years ago #

    I had to write my own patch that got rid of it. Its been a while but i think that # is also used in determining the final minify name (md5 hash) which is probably not a good idea since every time it does a new minify on the same files you will get a new name which will break tihngs like cache plugins if the times arent in sync (missing files). And then there is the issue with those who crawled your page will find your minify js/css file(s) are now gone and will potentially flag the site as suspicious since these files keep disappearing every xx hours/days.

    There are a few of us here who have made our own forked versions of this plugin and one day we might just merge them.

    I havent worked on this plugin for several months now so i forget all the things i've added or patched but it works very well in every way now.

  3. retroriff
    Member
    Posted 2 years ago #

    I am also very interested to remove it.

  4. Kimberly
    Member
    Posted 2 years ago #

    Oh, if all you want is to remove the "?m=" postfix then just change line 625 of the wp-minify.php file from

    $cache_url = $this->c->get_plugin_url().'cache/'.md5($url).$type.'?m='.filemtime($cache_file);

    to

    $cache_url = $this->c->get_plugin_url().'cache/'.md5($url).$type;
  5. retroriff
    Member
    Posted 2 years ago #

    Thanks :)

  6. Mr Eddy
    Member
    Posted 2 years ago #

    Hi,

    This an "old" topic, but I was looking in this plugin to check some stuff and found out this discussion.

    Apart from removing the string, how does this change affects the way wp-minify caches files ?

  7. Kimberly
    Member
    Posted 2 years ago #

    It won't affect wp-minify's caching ability at all (files are recached based on the generated file's modified time -- recall that these packed files are made up of individual files so if any of them are modified this packed file gets updated -- as determined by the file system). But the removing of the "?m=" does affect how proxies cache.

    From my poking around with its code wp-minify also makes use of ?m= when formulating a pretty url name which is actually quite silly since under conditions will lead to bigger problems which i think the author never realized.

  8. Mr Eddy
    Member
    Posted 2 years ago #

    I noticed too the use of ?m= with "pretty" url. I was waiting for some caching to be updated (as you noticed on another thread) so I tried to undo this tweak. It didn't change anything. I don't really understand why he choose to use ?m in pretty url, but it doesn't help much. We'll redo it after some other tweakings that are ongoing (was reworking the hole SEO/speed thing), and hope it won't be messed up in the meantime :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic