Title: Resource Versioning
Author: Viktor Szépe
Published: <strong>2015年7月15日</strong>
Last modified: 2018年7月21日

---

プラグインを検索

![](https://ps.w.org/resource-versioning/assets/banner-772x250.png?rev=1199655)

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

![](https://ps.w.org/resource-versioning/assets/icon-256x256.png?rev=1199655)

# Resource Versioning

 作者: [Viktor Szépe](https://profiles.wordpress.org/szepeviktor/)

[ダウンロード](https://downloads.wordpress.org/plugin/resource-versioning.0.3.0.zip)

 * [詳細](https://ja.wordpress.org/plugins/resource-versioning/#description)
 * [レビュー](https://ja.wordpress.org/plugins/resource-versioning/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/resource-versioning/#installation)
 * [開発](https://ja.wordpress.org/plugins/resource-versioning/#developers)

 [サポート](https://wordpress.org/support/plugin/resource-versioning/)

## 説明

“It’s important to make resources (images, scripts, stylesheets, etc.) cacheable.”

[Steve Souders](http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/)

It is much easier to use a CDN without Query String Parameters.
 This plugins alters
only local resources’ URL-s. The `ver` Query String Parameter will be inserted into
the filename.

For example `jquery.min.js?ver=1.10` becomes `jquery.min.110.js`.

To reverse this in the web server add this line to your nginx config:

    ```
    server {
        location ~ ^(.+)\.\d\d+\.(js|css|png|jpg|jpeg|gif|ico)$ {
            #try_files $uri $1.$2 /index.php?$args;
            try_files $uri $1.$2 =404;
        }
    }
    ```

Or to your Apache configuration or `.htaccess` file.

    ```
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)\.\d\d+\.(js|css|png|jpg|jpeg|gif|ico)$ $1.$2 [NC,L]
    ```

#### Testing the plugin before live usage

You can test the plugin by replacing the two `add_filter()` calls with this

    ```
    require_once( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );
    wp();
    echo o1_revving_src( $argv[1] ) . PHP_EOL;
    ```

Then start it from CLI: `php revving.php <TEST-URL>`

#### Links

Development of this plugin goes on on [GitHub](https://github.com/szepeviktor/resource-versioning).

## インストール

This section describes how to install the plugin and get it working.

 1. Upload `revving.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

  How to remove all Query String Parameters from resources?

Poorly written plugins and themes may add unwanted Query String Parameters.
 For
example `?rev=4.10`.

To drop all these parameters copy this into your `wp-config.php`:

    ```
    define( 'O1_REMOVE_ALL_QARGS', true );
    ```

## 評価

![](https://secure.gravatar.com/avatar/3b49954fddcafd8dde33e96c750f034ef5ebe8753516d2bd35b87bff4e282957?
s=60&d=retro&r=g)

### 󠀁[Perfect Cache Busting Method](https://wordpress.org/support/topic/perfect-cache-busting-method/)󠁿

 [mwmcw](https://profiles.wordpress.org/mwmcw/) 2017年9月6日

Simple to install, does what it should do. Integrates perfectly well! Thank you 
very much, Viktor!

 [ 1件のレビューをすべて表示 ](https://wordpress.org/support/plugin/resource-versioning/reviews/)

## 貢献者と開発者

Resource Versioning はオープンソースソフトウェアです。以下の人々がこのプラグイン
に貢献しています。

貢献者

 *   [ Viktor Szépe ](https://profiles.wordpress.org/szepeviktor/)

[“Resource Versioning” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/resource-versioning)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/resource-versioning/)する
か、[SVN リポジトリ](https://plugins.svn.wordpress.org/resource-versioning/)をチェック
するか、[開発ログ](https://plugins.trac.wordpress.org/log/resource-versioning/)を
[RSS](https://plugins.trac.wordpress.org/log/resource-versioning/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 0.3.0

 * Support cdn-ified URL-s without protocol schema.
 * More structured code.

#### 0.2.0

 * Strengthen stability.
 * Support cdn-ified URL-s.

#### 0.1.3

 * FIX: Use proper WordPress function for content URL.

#### 0.1.2

 * FIX: Don’t run on admin.

#### 0.1.1

 * FIX: External URL detection.

#### 0.1.0

 * Initial relase without multisite support.

## メタ

 *  バージョン **0.3.0**
 *  最終更新日 **8年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 4.0またはそれ以降 **
 *  検証済み最新バージョン: **4.9.29**
 *  言語
 * [English (US)](https://wordpress.org/plugins/resource-versioning/)
 * タグ
 * [Apache](https://ja.wordpress.org/plugins/tags/apache/)[file](https://ja.wordpress.org/plugins/tags/file/)
   [nginx](https://ja.wordpress.org/plugins/tags/nginx/)[resource](https://ja.wordpress.org/plugins/tags/resource/)
   [varnish](https://ja.wordpress.org/plugins/tags/varnish/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/resource-versioning/advanced/)

## 評価

 5つ星中5つ星

 *  [  1 5-星レビュー     ](https://wordpress.org/support/plugin/resource-versioning/reviews/?filter=5)
 *  [  0 4-星レビュー     ](https://wordpress.org/support/plugin/resource-versioning/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/resource-versioning/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/resource-versioning/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/resource-versioning/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/resource-versioning/reviews/#new-post)

[すべてのレビューを見る](https://wordpress.org/support/plugin/resource-versioning/reviews/)

## 貢献者

 *   [ Viktor Szépe ](https://profiles.wordpress.org/szepeviktor/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/resource-versioning/)

## 寄付

このプラグインが今後も改善できるよう応援しませんか ?

 [ このプラグインに寄付 ](https://szepe.net/wp-donate/)