Title: HTTP/2 Server Push
Author: Dana Ross
Published: <strong>22 جولای 2015</strong>
Last modified: 25 مارس 2018

---

جستجوی افزونه‌ها

این افزونه **با ۳ نگارش عمدهٔ اخیر وردپرس آزمایش نشده است**. ممکن است دیگر نگهداری
یا پشتیبانی نشود و هنگام استفاده با نگارش‌های تازه‌تر وردپرس مشکل سازگاری داشته 
باشد.

![](https://ps.w.org/http2-server-push/assets/icon-256x256.png?rev=1204349)

# HTTP/2 Server Push

 توسط [Dana Ross](https://profiles.wordpress.org/csixty4/)

[دانلود](https://downloads.wordpress.org/plugin/http2-server-push.1.4.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/http2-server-push/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/http2-server-push/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/http2-server-push/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/http2-server-push/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/http2-server-push/)

## توضیحات

HTTP/2 is the new generation of the venerable HTTP protocol that powers the web.
Among its most powerful features is _server push_, a way for web servers to send
resources to the browser before it even realizes it needs them. This avoids the 
usual HTTP request/response cycle which happened for every script or stylesheet 
on a page.

This plugin enables WordPress to send a `Link:<...> rel="prefetch"` header for every
enqueued script and style as WordPress outputs them into the page source. Unfortunately,
it can’t help plugins and themes that output their scripts directly into the page
itself, but these will continue to work as they always have.

Requires a web server that supports HTTP/2.

### WordPress 4.6 and above

WordPress 4.6 introduced [native support for resource hints](https://make.wordpress.org/core/2016/07/06/resource-hints-in-4-6/).

By default, this plugin defers to WordPress 4.6 and theme/plugin developers to responsibly
prefetch the right assets. Sites running on older versions of WordPress will continue
to get the previous behavior where all JavaScript and stylesheets had resource hints
printed for them.

I’ve added a filter To restore the old behavior (hint everything) on WordPress 4.6
and above. To use it, add this line to
 your theme’s functions.php file or a custom
plugin:

    ```
    `add_filter('http2_render_resource_hints', '__return_true');```
    ```

## نصب

Install HTTP/2 Server Push automatically from your admin account by selecting “Plugins”,
then “Add new” from the sidebar menu. Search for HTTP/2 Server Push, then choose“
Install Now”.

or

Download the latest HTTP/2 Server Push plugin archive from wordpress.org. Unzip 
the archive and upload the http2_server_push directory to the /wp-content/plugins/
directory on your WordPress site. Activate the plugin through the ‘Plugins’ menu
in WordPress

## سوالات متداول

  Installation Instructions

Install HTTP/2 Server Push automatically from your admin account by selecting “Plugins”,
then “Add new” from the sidebar menu. Search for HTTP/2 Server Push, then choose“
Install Now”.

or

Download the latest HTTP/2 Server Push plugin archive from wordpress.org. Unzip 
the archive and upload the http2_server_push directory to the /wp-content/plugins/
directory on your WordPress site. Activate the plugin through the ‘Plugins’ menu
in WordPress

  What if my web server doesn’t support HTTP/2 or “server push”?

Server push is triggered by the same mechanism as _link prefetching_, which almost
all major modern browsers support over HTTP 1.x. So even if you can’t take advantage
of HTTP/2’s features, people visiting your site may still get a better experience
from prefetching.

  How do I know if this is working?

There are a couple ways:

 1. [nghttp](https://www.nghttp2.org/documentation/nghttp.1.html) is an HTTP/2 client
    that ships with the nghttp2 suite. `nghttp -v http://example.com` will show all
    the HTTP/2 signalling packets, HTTP headers, content, and resources sent from the
    server in a single request. You can see `PUSH PROMISE` signals from the server 
    and the pushed resources after the main page is sent.
 2. In Google Chrome, chrome://net-internals/#spdy will show a history of server connections
    from the browser. Clicking on a connection will show the discussion between the
    browser and the server. Within that text, you can see `PUSH PROMISE` packets and
    the pushed resources.

  How can I help with development and testing?

The source code is available at [https://github.com/daveross/http2-server-push](https://github.com/daveross/http2-server-push).
Issues and pull requests are welcome and encouraged!

## نقد و بررسی‌ها

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

### 󠀁[Working!](https://wordpress.org/support/topic/working-172/)󠁿

 [Juuso Turunen](https://profiles.wordpress.org/juusoturunen/) 9 ژوئن 2019

This plugin works very well!

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

### 󠀁[Works perfectly](https://wordpress.org/support/topic/works-perfectly-1658/)󠁿

 [bettersecurity](https://profiles.wordpress.org/bettersecurity/) 9 آوریل 2019

Works perfectly in conjunction with Cloudflare to deliver excellent performance

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

### 󠀁[Not enough to trigger proper HTTP2 Server Push](https://wordpress.org/support/topic/this-is-not-http2-push/)󠁿

 [blablabla](https://profiles.wordpress.org/gabo13/) 22 نوامبر 2018

It’s not enough to trigger a proper HTTP2 Server Push without warnings for all preloaded
resources. It needs some header checks.

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

### 󠀁[works as advertised](https://wordpress.org/support/topic/works-as-advertised-428/)󠁿

 [jeduan](https://profiles.wordpress.org/jeduan/) 23 می 2017

this plugin just works.

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

### 󠀁[Works as advertised](https://wordpress.org/support/topic/works-as-advertised-420/)󠁿

 [Daniel Chase](https://profiles.wordpress.org/riseofweb/) 12 آوریل 2017

This plugin helped speed up my website by 33%!

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

### 󠀁[Jumpin’ Geehosofats](https://wordpress.org/support/topic/jumpin-geehosofats/)󠁿

 [wasanajones](https://profiles.wordpress.org/wasanajones/) 5 نوامبر 2016

Boink ! endless hours fine tuning and agonizing over my complicated site(s) with
a gazillion plugins and scripts. tried every cache ever made for wordpress. different
CDN’s… fire breathing VPS… without Cloudflare, and Simple Cache site loads in something
like 16 seconds now using all free cloudflare, simple cache and HTTP/2 Server Push…
Pingdom is telling me it loaded in UNDER 2 seconds…

 [ خواندن تمامی 12 نقد و بررسی‌ ](https://wordpress.org/support/plugin/http2-server-push/reviews/)

## توسعه دهندگان و همکاران

“HTTP/2 Server Push” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Dana Ross ](https://profiles.wordpress.org/csixty4/)

[ترجمه “HTTP/2 Server Push” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/http2-server-push)

### علاقه‌ مند به توسعه هستید؟

[کد را مرور کنید](https://plugins.trac.wordpress.org/browser/http2-server-push/)،
[مخزن SVN](https://plugins.svn.wordpress.org/http2-server-push/) را بررسی کنید، 
یا از طریق [RSS](https://plugins.trac.wordpress.org/log/http2-server-push/?limit=100&mode=stop_on_copy&format=rss)
در [گزارش توسعه](https://plugins.trac.wordpress.org/log/http2-server-push/) مشترک
شوید.

## گزارش تغییرات

#### 1.0

 * Initial release

#### 1.1

 * Fix errors starting the output buffer through the template_redirect action

#### 1.2

 * Support for protocol-relative URLs
 * Implemented “resource hints” to encourage preload/prefetch behavior when HTTP/
   2 support is lacking.
 * Fixed ‘as’ value to match latest W3C specs

#### 1.3

 * Doesn’t render resource hints when WordPress native support is present
 * No longer pushes assets on admin pages
 * Limits HTTP/2 Server Push headers to 4k to help alleviate 520 errors when used
   with Cloudflare

#### 1.4

 * Uses site_url instead of home_url for better WPML compatibility
 * Tested up to WordPress 4.9.4

## اطلاعات

 *  نگارش **1.4**
 *  آخرین به‌روزرسانی **8 سال پیش**
 *  نصب‌های فعال **900+**
 *  نگارش وردپرس ** 3.0 یا بالاتر **
 *  آزمایش‌شده تا **4.9.30**
 *  زبان
 * [English (US)](https://wordpress.org/plugins/http2-server-push/)
 * برچسب
 * [http2](https://fa.wordpress.org/plugins/tags/http2/)[performance](https://fa.wordpress.org/plugins/tags/performance/)
   [prefetch](https://fa.wordpress.org/plugins/tags/prefetch/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/http2-server-push/advanced/)

## امتیازها

 4.2 از 5 ستاره.

 *  [  امتیاز 7 5-ستاره     ](https://wordpress.org/support/plugin/http2-server-push/reviews/?filter=5)
 *  [  امتیاز 1 4-ستاره     ](https://wordpress.org/support/plugin/http2-server-push/reviews/?filter=4)
 *  [  امتیاز 2 3-ستاره     ](https://wordpress.org/support/plugin/http2-server-push/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/http2-server-push/reviews/?filter=2)
 *  [  امتیاز 1 1-ستاره     ](https://wordpress.org/support/plugin/http2-server-push/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/http2-server-push/reviews/#new-post)

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/http2-server-push/reviews/)

## مشارکت کنندگان

 *   [ Dana Ross ](https://profiles.wordpress.org/csixty4/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/http2-server-push/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](http://www.giffordcatshelter.org/)