PhastPress

Описание

Phastpress использует передовые методы для управления вашими страницами, скриптами, таблицами стилей и изображениями, чтобы значительно сократить время загрузки. Он разработан в соответствии с рекомендациями Google PageSpeed Insights и GTmetrix и может значительно повысить рейтинг вашего сайта.

Девиз PhastPress — никакой конфигурации. Устанавливайте, активируйте и вперед!

PhastPress has the Phast web page optimisation engine by Albert Peschar and Milko Kosturkov at its core.

Оптимизация изображения:

  • Phast оптимизирует изображения с помощью квантования PNG (pngquant) и перекодирование в формате JPEG (libjpeg-turbo).
  • Phast добавляет небольшие изображения (< 512 байт) на страницу.
  • Phast преобразует изображения в формате JPEG в формат WebP для поддерживающих этот формат браузеров.
  • PhastPress включает встроенную отложенную загрузку для ускорения загрузки страницы и экономии интернет траффика.

Асинхронные скрипты и таблицы стилей:

  • Phast загружает все скрипты на вашей странице асинхронно и в одном запросе, сохраняя при этом полную совместимость с устаревшими скриптами благодаря нашему пользовательскому загрузчику скриптов.
  • Phast подключает через прокси-серверы внешние скрипты для продления срока службы их кэша.
  • Phast inlines critical CSS automatically by comparing the rules in your stylesheets with the elements on your page.
  • Phast loads non-critical CSS asynchronously and in a single request.
  • Phast inlines Google Fonts CSS.
  • Phast загружает IFrames с задержкой, чтобы в первую очередь отобразить содержание главной страницы.

Получите все возможности Phast для своего веб-сайта, установив PhastPress прямо сейчас.

For commercial support and bug reports, click here.

Установка

  1. Загрузите плагин PhastPress на свой сайт и активируйте его.
  2. Убедитесь, что PhastPress активирован на странице настроек.
  3. Test your site. If you experience any issues, you may request commercial support.

Часто задаваемые вопросы

Нужен ли плагин оптимизации если используется PhastPress?

Нет. Вам не нужны никакие другие плагины оптимизации изображений (такие как Smush, например) или уменьшение размеров — минификации файлов (например, Autoptimize) после установки PhastPress, поскольку PhastPress включает в себя все необходимые функции оптимизации.

Я рекомендую использовать простую комбинацию PhastPress и WP Super Cache. Это уменьшает вероятность конфликтов между плагинами, и это действительно всё, что вам нужно.

Fast Velocity Minify несовместима с PhastPress и это приводит к тому, что PhastPress не будет работает. Пожалуйста, используйте любой из плагинов, но не оба одновременно.

Как насчет кэширования и совместимости с плагинами кэширования?

Кэширование означает сохранение HTML-кода при первом посещении страницы чтобы при последующих посещениях не генерировать этот же код каждый раз. Кэширование, в паре с PhastPress, также повышает производительность, поскольку страницу необходимо оптимизировать только один раз. Рекомендуется использовать плагин кэширования с PhastPress.

PhastPress не является плагином для кэширования. Я рекомендую использовать WP Super Cache в сочетании с PhastPress для ускорения времени отклика вашего сервера (TTFB).

В случае, если вы используете другой плагин для кэширования, пожалуйста, прочтите примечания ниже:

WP Fastest Cache: Совместим с PhastPress, но оптимизация без кэширования должна быть отключена. Отключите самые быстрые параметры кэша WP в этот скриншот.

W3 Total Cache : Совместим с PhastPress, но оптимизация без кэширования должна быть отключена. В частности, опция Запретить кэширование объектов после изменения настроек вызывает проблемы.

Средство включения кэша (по KeyCDN): Несовместимо с PhastPress. Кэшированные страницы не будут оптимизированы.

По идее, PhastPress должен корректно работать со всеми генерирующими кеш плагинами. Некоторые из них также оптимизируют JavaScript, CSS и/или изображения. Моя рекомендация — отключить все функции оптимизаций, чтобы избежать технических конфликтов с PhastPress.

Совместим ли PhastPress с Asset Cleanup: Page Speed Booster?

Да. Основная функция Asset Cleanup: Ускорение загрузки (Page Speed Booster) дополняет PhastPress путём удаления неиспользуемых кодов JavaScript и CSS со страницы.

Не используйте функции Asset Cleanup для оптимизации CSS и JS. Эти функции могут вызвать конфликты с PhastPress, и они не нужны, потому что PhastPress уже их выполняет.

Плагин включен, однако его работы не видно.

Возможно, используется плагин, который сжимает страницу до того, как PhastPress обработает ее. В этом случае, PhastPress не может применить оптимизацию.

Например, при использовании плагина Far Future Expiry Header , отключите опцию «Включить Gzip сжатие «.

Почему работа PhastPress не влияет на «Время полной загрузки», измеряемое GTmetrix?

«Время полной загрузки» в GTmetrix — это время, необходимое для прекращения всей сетевой активности. Это измерение может быть некорректным, поскольку оно не учитывает очередность загрузки ресурсов.

Обычно внешние ресурсы, такие как скрипты и таблицы стилей, должны быть загружены, проанализированы и выполнены до того, как страница может быть отображена. PhastPress изменяет эту последовательность, включая все необходимые ресурсы (то есть критический CSS) на странице и выполняя сценарии асинхронно, чтобы они не блокировали представления страницы.

Это приводит к тому, что страница отображается раньше в браузере, но не изменяет время полной загрузки GTmetrix.

Чтобы увидеть этот эффект, зарегистрируйтесь и войдите в GTmetrix , включите опцию «Видео». Затем протестируйте свой сайт (с активированным плагином) используя кнопку «Сравнить», чтобы снова протестировать свой сайт, но при этом добавив «?phast =-phast» к URL-адресу (например, https://example.com/?phast=-phast ). Когда загрузится сравнение, выберите вкладку «Кадры», и вы увидите разницу. Оптимизированная плагином, версия вашего сайта должна начать загрузиться намного раньше.

Можно ли использовать хук для отключения PhastPress?

Если необходимо отключить PhastPress на каких-либо страницах, используйте этот код:

add_filter('phastpress_disable', '__return_true');

Убедитесь, что этот код выполняется во время template_redirect или до него.

Могу ли я отключить плагин Phastpress для страниц оформления заказа и корзины WooCommerce?

Добавьте этот код в свою тему functions.php , или в новый файл созданный в wp-content/mu-plugins:

add_filter('phastpress_disable', function ($disable) {
    return $disable || is_cart() || is_checkout();
});

Когда и каким образом PhastPress очищает кэш созданный плагином?

PhastPress использует информацию о размере файла и времени модификации для обнаружения изменений файлов, поэтому очистка кэша обычно не требуется. Когда вы изменяете скрипт или CSS-файл, изменение должно быть видно сразу после перезагрузки.

Если вы хотите очистить кэш, вы можете удалить все данные по этому пути wp-content/cache/phastpress или wp-content/plugins/phastpress/cache.

Как исключить конкретный скрипт из оптимизации?

По умолчанию PhastPress задерживает загрузку всех скриптов до завершения загрузки DOM, чтобы браузер мог отобразить страницу как можно быстрее. Если вы хотите как можно скорее загрузить определенные скрипты, такие как Google Analytics, вы можете добавить в скрипт атрибут data-phast-no-defer. Также рекомендую пометить внешние скрипты как async, где это возможно.

Например:

<script data-phast-no-defer>
// my script goes here
</script>

Или:

<script async data-phast-no-defer src="http://url.to.my.script/"></script>

Если ваша тема (или плагин), для добавления скрипта на страницу, использует wp_enqueue_script , вы можете использовать следующий ключ данныхphast_no_defer , чтобы PhastPress больше не обрабатывал скрипт:

wp_script_add_data('my_script_name', 'phast_no_defer', true);

Убедитесь, что это выполняется после регистрации скрипта. Если вам нужно применить это к скрипту, загруженному плагином, можно использовать этот хук wp_print_scripts :

add_action('wp_print_scripts', function () {
    wp_script_add_data('my_script_name', 'phast_no_defer', true);
});

Если вы используете исходный код HTML для поиска имени скрипта, обратите внимание, что -js и -js-extra не являются частью имени. Например, для скрипта типа <script id="jquery-core-js"> в исходном коде имя скрипта jquery-core, и это именно то, что вы должны ?передать? в wp_script_add_data.

Применяется автоматически для следующих скриптов:

  • Скрипт Google Analytics, внедрен Monsterinsights начиная с версии Phastpress 1.29.
  • Tracking script inserted by Slimstat Analytics since PhastPress 1.30.
  • Скрипт Google Analytics, внедрен Google Site Kit начиная с версии PhastPress 1.75.
  • Скрипт Google Analytics, внедрен GA Google Analytics начиная с версии PhastPress 1.76.

Собирает ли PhastPress данные или использует для этой цели внешние сервисы?

Изображения оптимизируются с помощью бесплатного API, предоставленного создателем PhastPress.

Во время оптимизации изображения в API отправляются следующие данные:

  • URL-адрес сайта, на котором используется плагин PhastPress
  • версия плагина
  • версия PHP (для отслеживания требований к совместимости)
  • само изображение

Изображения отправляются в API только один раз. Обработанные изображения хранятся локально и не сохраняются API.

Если оптимизация изображения отключена, API использоваться не будет.

Появляется уведомление об ошибке «Заголовки уже отправлены». Как это исправить?

Ваша тема или плагин пытаются отправить HTTP-заголовки после того, как страница начала отображаться и байты были отправлены в браузер. Так быть не должно, однако это работает, когда включена буферизация вывода PHP данных.

PhastPress всегда отправляет выходные данные максимально быстро. Это означает, что эта проблема не может быть устранена без замедления работы сайтов не содержащих некорректно функционирующих тем/плагинов.

Чтобы устранить данную проблему на вашем сайте, необходимо запустить следующий код, чтобы включить буферизацию вывода данных:

<?php
add_action('template_redirect', function () {
    ob_start();
});

Можно добавить этот код в файл functions.php вашей темы или создать output-buffer.php файл в папке wp-content/mu-plugins с этим же кодом. Возможно, сначала, вам придется создать эту директорию.

Либо, скачайте output-buffer.zip и извлеките содержимое в свою веб-папку. В итоге у вас должен получиться файл с именем output-buffer.php в папке wp-content/mu-plugins.

Можно ли оптимизировать изображения, без изменения их URL-адресов?

Да. Просто добавьте эти две строки в свой .htaccess файл :

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^wp-content/.*[^/]\.(jpe?g|gif|png)$ wp-content/plugins/phastpress/phast.php [L,NC,E=PHAST_SERVICE:images]

Затем в меню настроек PhastPress отключите оптимизацию изображений в тегах и CSS.

Теперь, обновите страницу сайта и проверьте, оптимизированы ли изображения.

Is it possible to use PhastPress with a CSP?

Yes, as long as you use a CSP with a script-src policy containing nonce-*. To enable Phast’s support for CSP implement the phastpress_csp_nonce filter:

<?php
add_filter('phastpress_csp_nonce', function () {
    return 'my-nonce';
});

Why do images not get converted to WebP when using Cloudflare?

Cloudflare does not support Vary: Accept, so sending WebP via Cloudflare can cause browsers that don’t support WebP to download the wrong image type. You can try using Cloudflare Polish instead.

Отзывы

I once saw a video from a YouTuber called Web Squadron. He adviced to use Phastpress and WP Meteor to use to optimize WordPress. I’ve been using WP Rocket for a while now. It did improve the speed of our site but all those options were just too hard to perfectly set up.  Phastpress is just a really simple and a great plug-in. It improves the Pagespeed score a good bit and in combination with WP Meteor, it’s even better! I myself use EWWW Image optimizer to optimize and lazyload all my images. I can easily disable the lazy load option in Phastpress and it seems to be perfectly compatible with all sort of plugins. It works great with Elementor (and WooCommerce, ARMember, ACF, etc) and I haven’t seen any quirks yet.  Thank you for creating this great FREE plug-in!
06.03.2023
This plugin is simple to setup but it very effective in optimizing the website. The number of requests for a page when way down. Initially there were some errors caused by CSS Optimizations. Albert quickly responded within a few hours, even over the weekend, and changed a setting to fix the problem. I was made of aware of this plugin by Imran "How to Boost Page Speed Optimization WordPress for FREE in 2023 "
07.08.2022
Over the years, I think I've tried just about every optimization plugin out there, Including WP Rocket, Autoptimize, etc. PhastPress is better than all of them, and it's free. I'd be happy to pay for this plugin; it's that good. Big thanks to Albert :))
16.06.2021
The plugin works as promised and delivers the results in no time. I am very glad that I found this plugin. In addition, Albert is the person who really cares about regular users like myself. I was contacting him with some questions and received decent response. Keep up a great job! Simon
Посмотреть все 98 отзывов

Участники и разработчики

«PhastPress» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«PhastPress» переведён на 2 языка. Благодарим переводчиков за их работу.

Перевести «PhastPress» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

3.2 — 2024-02-23

  • Do not check SQLite version and do not require support for WITHOUT ROWID.

Updated Phast to version 1.110 to support versions of SQLite without WITHOUT ROWID support.

3.1 — 2024-02-21

  • Check that SQLite is version 3.8.2 or newer.

3.0 — 2023-12-01

  • Moved from deprecated \Requests to \WpOrg\Requests\Requests class.
  • PhastPress now requires WordPress 6.2.

2.19 — 2023-10-27

  • Bump «Tested up to» to WordPress 6.4.

2.18 — 2023-08-10

  • Bump «Tested up to» to WordPress 6.3.

2.17 — 2023-08-09

  • In resource optimization service, stop wp-load.php as soon as WPINC is defined.

2.16 — 2023-05-14

  • Fix deprecation warnings in the control panel.
  • Fix installation notice on dashboard.

Update Phast to version 1.109:

  • Fix deprecation warnings.

2.15 — 2023-05-13

Update Phast to version 1.108:

  • Fix deprecation warnings.

2.14 — 2023-04-17

  • Fix fatal error on phastpress_disable if unconfigured.

2.13 — 2023-04-17

Update Phast to version 1.107:

  • Prevent duplication of self-closing <meta charset> tags.

2.12 — 2023-03-30

  • Fix WordPress 6.2 compatibility.

2.11 — 2023-03-18

  • Bump «Tested up to» to WordPress 6.2.

2.10 — 2022-11-18

Update Phast to version 1.106:

  • Set Content-Type: application/json header on bundler responses.
  • Remove X-Robots-Tag header.

2.9 — 2022-11-07

  • Prevent undefined array index warning.

2.8 — 2022-11-07

2.7 — 2022-10-31

  • Bump «Tested up to» to WordPress 6.1.

Update Phast to version 1.105:

  • Set X-Robots-Tag: none header on bundler responses to prevent search engines from indexing them.

2.6 — 2022-10-11

  • Bump «Tested up to» to WordPress 6.0.2.

2.5 — 2022-08-06

  • Add nonce attributes to script tags generated by PhastPress itself.

PhastPress now requires WordPress 5.7 or later.

2.4 — 2022-07-26

  • Add phastpress_csp_nonce filter.

2.3 — 2022-04-04

  • Clarity PDO_SQLITE requirement message.

2.2 — 2022-04-03

Update Phast to version 1.104:

  • Improve CSP support.
  • Use SQLite3 database for caching instead of a file tree.

2.1 — 2021-10-07

Обновите Phast до версии 1.103:

  • Update CA bundle.

2.0 — 2021-09-27

  • Требуется версия PHP 7.3.

Обновите Phast до версии 1.102:

  • Не переписывайте URL-адреса динамически вставляемых модульныхскриптов. Это необходимо для совместимости с Presto Player.

1.125 — 2021-09-07

Update Phast to version 1.101:

  • Ensure the security token never gets reset when the cache grows too large. This prevents resource URLs from changing suddenly.

1.124 — 2021-05-31

  • Prevent dark flash when OS dark mode is active but theme dark mode is disabled.

1.123 — 2021-05-26

  • Add missing file; simplify logic; improve log message.

1.122 — 2021-05-26

  • Prevent light flash when using the dark mode in the Twenty Twenty One theme, even when the page is large enough to trigger multiple renders.

This release misses a file. Please use 1.123 instead.

1.121 — 2021-05-20

  • Prevent light flash when using the dark mode in the Twenty Twenty One theme.

1.120 — 2021-05-13

Обновите Phast до версии 1.100:

  • Send 403 and 404 status codes for unauthorized and not found resource URLs respectively, if they cannot be safely redirected to the original resource.

1.119 — 2021-05-09

  • Fix notice on undefined cspNonce variable.

1.118 — 2021-05-04

  • Avoid an issue with the Stop Spammers plugin preventing the install notice from being closed.

1.117 — 2021-04-28

Update Phast to version 1.99:

  • Prefix async, defer attributes with data-phast- to please W3C validator.

1.116 — 2021-04-21

  • Update settings labels about IFrame lazy loading.

1.115 — 2021-04-21

Update Phast to version 1.98:

1.114 — 2021-03-17

  • Deterministically generate security key based on WordPress secret keys. This avoids URLs changing when the cache is emptied.

1.112 — 2021-03-17

  • Bump WordPress compatibility to 5.7.

1.111 — 2021-03-17

Update Phast to version 1.97:

  • Fix open redirect on phast.php. This would allow a malicious person to redirect someone to a third-party site via phast.php by sending them a link. This can enable phishing attacks if the user is mislead by the hostname of the initial URL. It does not compromise the security of your site itself.

1.110 — 2021-03-11

Update Phast to version 1.96:

  • Don’t emulate document.currentScript for scripts that are executed normally. This prevents some scripts from seeing the wrong currentScript accidentally.

1.109 — 2021-03-09

Update Phast to version 1.95:

  • Do not rewrite <img> element src when it has a rev-slidebg class and points to transparent.png. This is because Revolution Slider‘s JavaScript depends on the image filename for its logic.

1.108 — 2021-03-09

  • Optimize AJAX responses generated by the quick view functionality in Flatsome theme.

1.107 — 2021-03-09

Update Phast to version 1.94 to support this improvement.

1.106 — 2021-03-08

Update Phast to version 1.93:

  • Don’t optimize snippets if they look like JSON objects, ie, start with {".

1.105 — 2021-03-08

Обновите Phast до версии

  • Support whitespace in url() in CSS. Eg, url( 'file.jpg' ) is not
    processed correctly.

1.104 — 2021-03-04

Обновите Phast до версии

  • Make message about inability to override document.readyState a warning rather than an error, to avoid spurious complaints from PageSpeed Insights.

1.103 — 2021-03-04

Обновите Phast до версии

  • Correctly support additional arguments when using setTimeout. This fixes a regression in version 1.83.

1.102 — 2021-03-04

  • Add phastpress_optimize_snippet function to allow arbitrary HTML to be optimized.

Обновите Phast до версии

  • Ensure error pages are always interpreted as UTF-8.

1.101 — 2021-02-26

Обновите Phast до версии

  • Simplify PATH_INFO calculation if the environment variable is missing. This is now determined by splitting the path component of REQUEST_URI on .php/.
  • Improve error messages, hopefully aiding troubleshooting when phast.php isn’t doing it’s job.

1.100 — 2021-02-18

  • Handle multisite installations in subdirectories.

1.99 — 2021-02-05

Обновите Phast до версии

  • Fix handling of closing parenthesis and string literal separated by newline in JSMin.

1.98 — 2021-02-02

1.97 — 2021-02-01

Обновите Phast до версии

  • Use text/plain MIME type for the bundled CSS and JS responses. This helps apply automatic response compression in some server configurations (specifically o2switch).

1.96 — 2021-01-28

Обновите Phast до версии

  • Raise maximum page size to 2 MiB.

1.95 — 2021-01-28

  • Add compatibility for LiteSpeed Cache. PhastPress optimizations would not work before this.

1.94 — 2021-01-18

Обновите Phast до версии

  • Detect WOFF2 support using a feature test, instead of relying on the user agent. This fixes Google Fonts on iOS 9 and earlier.

1.93 — 2021-01-04

Обновите Phast до версии

  • Make sure setTimeout chains in DOMContentLoaded are completely executed before the load event is triggered. This fixes some uses of jQuery’s ready event.

1.92 — 2020-12-16

Обновите Phast до версии

  • Use Base64-based path info for server-generated URLs.

1.91 — 2020-12-16

Обновите Phast до версии

  • Encode characters that cannot occur in URLs. This fixes canonical URLs for optimized images if those URLs contained special characters.

1.90 — 2020-11-19

  • Delay NextGEN Gallery resource manager output buffer hook until after PhastPress deployment if WP Super Cache late init is enabled. This fixes an issue where footer scripts would disappear when NextGEN Gallery and WP Super Cache late init were used at the same time.

1.89 — 2020-11-18

  • Delay deployment until init hook if WP Super Cache late init is enabled. This fixes PhastPress optimizations being done on every load in WP Super Cache’s Simple mode, and not being done at all in Expert mode.

1.88 — 2020-11-18

Обновите Phast до версии

  • Support document.currentScript in optimized scripts. (This fixed compatibility with PDF Embedder.)
  • Prevent (suppressed) notice from ob_end_clean.

1.87 — 2020-10-28

Обновите Phast до версии

  • Handle <!doctype html ...> declarations correctly, and don’t insert <meta charset> before them. (This broke pages using old XHTML doctypes.)

1.86 — 2020-10-23

  • Disable PhastPress when editing with WPBakery.

1.85 — 2020-10-23

Обновите Phast до версии

  • Insert <meta charset=utf-8> tag right after <head> and remove existing <meta charset> tags. This fixes an issue where the <meta charset> tag appears more than 512 bytes into the document, causing encoding issues.

1.84 — 2020-10-23

Update Phast to version 1.76:

  • Stop proxying external scripts like Google Analytics. This feature had no performance benefit, and its only purpose was to improve scores in old versions of PageSpeed Insights.

1.83 — 2020-10-22

Update Phast to version 1.75:

  • Insert path separators (/) into bundler URLs in order to avoid Apache’s 255 character filename limit.

1.82 — 2020-10-20

Update Phast to version 1.74:

  • Ignore calls to document.write from async or defer scripts, in line with normal browser behaviour.

1.81 — 2020-10-20

  • Apply phast_no_defer script attribute to scripts generated by wp_localize_script.

1.80 — 2020-10-05

  • Prevent direct access to bootstrap.php, low-php-version.php and files in classes directory. This is not a security risk, but could generate errors.

1.79 — 2020-09-21

1.78 — 2020-09-09

  • Don’t resize images based on width/height attributes on img tags.

1.77 — 2020-09-08

  • Exclude cache from All-in-One WP Migration backups.

Update Phast to version 1.71.

  • Only process JPEG, GIF and PNG images. (Fix regression in 1.65.)

1.76 — 2020-09-04

  • Don’t defer GA Google Analytics scripts.

1.75 — 2020-09-04

  • Don’t defer Google Site Kit Analytics script.
  • Add support for phast_no_defer script attribute.

1.74 — 2020-08-30

Update Phast to version 1.70.

  • Add Last-Modified header to service response.

1.73 — 2020-08-27

  • Don’t use error suppression when checking query parameters, instead use isset. This prevents notices from appearing in some error logging plugins, even though they are suppressed.

1.72 — 2020-08-26

Update Phast to version 1.69.

  • Fix CSS proxy URL generation not to include __p__ filename twice.

1.71 — 2020-08-25

Update Phast to version 1.68.

  • Support URLs generated via Retina.js (when path info is enabled).

1.70 — 2020-08-21

Update Phast to version 1.67.

  • Fix IE 11 stylesheet fallbacks.

1.69 — 2020-08-21

Update Phast to version 1.66.

  • Convert <link onload="media='all'"> to <link media="all"> before inlining.
  • Elide media attribute on generated style tags if it is all.

1.68 — 2020-08-20

Update Phast to version 1.65.

  • Use path info URLs for bundler and dynamically inserted scripts.
  • Don’t whitelist local URLs but check that the referenced files exist.
  • Support BunnyCDN by optimizing resources on the CDN domain and loading processed resources via the CDN domain.

1.67 — 2020-08-18

Update Phast to version 1.64.

  • Preserve control characters in strings in minified JavaScript.
  • Use JSON_INVALID_UTF8_IGNORE on PHP 7.2+ instead of regexp-based invalid UTF-8 character removal.

1.66 — 2020-08-13

Update Phast to version 1.63.

  • Images in AMP documents are now optimized. No other optimizations are performed in AMP documents.

1.65 — 2020-08-11

Update Phast to version 1.62.

  • Add an option to lazy load images using native lazy loading (loading=lazy attribute). This is enabled by default.

1.64 — 2020-07-21

Update Phast to version 1.61.

  • Added an option to disable gzip compression of processed resources downloaded via phast.php. This might help to fix issues on hosts that compress already compressed responses.

1.63 — 2020-07-21

Update Phast to version 1.60:

  • Ensure that requestAnimationFrame callbacks run before onload event.
  • Don’t rewrite anchor URLs (like #whatever) in CSS.

1.62 — 2020-07-08

Update Phast to version 1.58:

  • Rewrite each URL in a CSS rule, not just the first one.

1.61 — 2020-06-17

  • Disable PhastPress during Asset Cleanup: Page Speed Booster analysis.

1.60 — 2020-06-10

Update Phast to version 1.55:

  • Only rewrite image URLs in arbitrary attributes inside the <body> tag.
  • Don’t optimize image URLs in attributes of <meta> tags.
  • When optimizing images, send the local PHP version to the API, to investigate whether PHP 5.6 support can be phased out.

1.59 — 2020-06-09

Update Phast to version 1.54:

  • Fix writing existing read-only cache files (on Windows).

1.58 — 2020-06-09

Update Phast to version 1.53:

  • Fix caching on Windows by not setting read-only permissions on cache files.
  • Add a checksum to cache files to prevent accidental modifications causing trouble.

1.57 — 2020-06-05

Update Phast to version 1.51:

  • Rewrite image URLs in any attribute, as long as the URL points to a local file and ends with an image extension.

1.56 — 2020-06-04

Update Phast to version 1.50:

  • Ignore link elements with empty href, or one that consists only of slashes.
  • Replace </style inside inlined stylesheets with </ style to prevent stylesheet content ending up inside the DOM.
  • Add font-swap: block for Ionicons.
  • Remove UTF-8 byte order mark from inlined stylesheets.

1.55 — 2020-05-28

  • Fix release.

1.54 — 2020-05-28

1.53 — 2020-05-27

Update Phast to version 1.49:

  • Send uncompressed responses to Cloudflare. Cloudflare will handle compression.

1.52 — 2020-05-25

Update Phast to version 1.48:

  • Stop excessive error messages when IndexedDB is unavailable.

1.51 — 2020-05-19

Update Phast to version 1.47:

  • Process image URLs in data-src, data-srcset, data-wood-src and data-wood-srcset attributes on img tags.

1.50 — 2020-05-18

This release should have updated Phast to version 1.47, but didn’t, by accident.

1.49 — 2020-05-14

Update Phast to version 1.46:

  • Whitelist cdnjs.cloudflare.com for CSS processing.

1.48 — 2020-05-13

Update Phast to version 1.45:

  • Use font-display: block for icon fonts (currently Font Awesome, GeneratePress and Dashicons).

1.47 — 2020-05-04

Update Phast to version 1.44:

  • Support data-pagespeed-no-defer and data-cfasync="false" attributes on scripts for disabling script deferral (in addition to data-phast-no-defer).
  • Leave data-{phast,pagespeed}-no-defer and data-cfasync attributes in place to aid debugging.

1.46 — 2020-04-30

Update Phast to version 1.43:

  • Base64 encode the config JSON passed to the frontend, to stop Gtranslate or other tools from mangling the service URL that is contained in it.

1.45 — 2020-04-15

Update Phast to version 1.42:

  • Speed up script load, and fix a bug with setTimeout functions running before the next script is loaded.

1.44

Update Phast to version 1.41:

  • Support compressed external resources (ie, proxied styles and scripts).

1.43

  • Image optimization functionality works again. You will have to re-enable it in the settings panel.

Update Phast to version 1.40:

  • Add s.pinimg.com, google-analytics.com/gtm/js to script proxy whitelist.

1.42

Update Phast to version 1.39:

  • Remove blob script only after load. This fixes issues with scripts sometimes not running in Safari.

1.41

Update Phast to version 1.38:

  • Fixed a regression causing external scripts to be executed out of order.

1.40

Update Phast to version 1.37:

  • Execute scripts by inserting a <script> tag with a blob URL, instead of using global eval, so that global variables defined in strict-mode scripts are globally visible.

1.39

Update Phast to version 1.36:

  • Clean any existing output buffer, instead of flushing it, before starting Phast output buffer.

1.38

Update Phast to version 1.35:

  • Use all service parameters for hash-based cache marker. This might fix some issues with stale stylesheets being used.

1.37

  • The phastpress_disable hook is now triggered during template_redirect instead of plugins_loaded, which allows you to use many more functions in your hook handlers.

Update Phast to version 1.34.

1.36

Update Phast to version 1.33:

  • Stop proxying dynamically inserted scripts after onload hits.
  • Combine the hash-based cache marker with the original modification time-based cache marker.
  • Remove comment tags (<!-- ... -->) from inline scripts.
  • Send Content-Length header for images.

1.35

Update Phast to version 1.31:

  • Change CSS cache marker when dependencies (eg, images) change. This prevents showing old images because CSS referencing an old optimized version is cached.

1.34

  • Store service config in service-config-* files for AppArmor compatibility, if there’s a rule that prevents writing *.php files.
  • Create index.html in cache directory to prevent path enumeration.

1.33

Update Phast to version 1.29:

  • Trick mod_security into accepting script proxy requests by replacing
    src=http://… with src=hxxp://....

1.32

Update Phast to version 1.28:

1.31

Update Phast to version 1.26:

1.30

  • Don’t delay SlimStats script.

1.29

  • Don’t delay Monsterinsights script so that Google Analytics works more reliably.

Update Phast to version 1.25:

  • Keep newlines when minifying HTML.

1.28

Update Phast to version 1.24:

  • Send Content-Security-Policy and X-Content-Type-Options headers on resources
    to speculatively prevent any XSS attacks via MIME sniffing.

1.27

  • Load configuration via wp-load.php instead of wp-config.php.

1.26

  • Fix incompatibility with Thrive Architect.

1.25

  • Test with WordPress 5.3.
  • Fix incompatibility with Divi Visual Builder.

1.24

Update Phast to version 1.23:

  • Make CSS filters configurable using switches.

1.23

  • Disable optimizations inside Yellow Pencil editor.

1.22

  • Mitigate restrictive access rules for /wp-content by adding our own .htaccess for phast.php.
  • Try to put cache directory in wp-content/cache or wp-content/uploads before using the plugin directory.

Update Phast to version 1.22:

  • Remove empty media queries from optimize CSS.
  • Use token to refer to bundled resources, to shorten URL length.
  • Clean up server-side statistics.
  • Add HTML minification (whitespace removal).
  • Add inline JavaScript and JSON minification (whitespace removal).
  • Add a build system to generate a single PHP file with minified scripts.

1.21

Update Phast to version 1.21:

  • Don’t attempt to optimize CSS selectors containing parentheses, avoiding a bug removing applicable :not(.class) selectors.

1.20

  • Fix compatibility issues by not prepending our autoloader.

1.19

Update Phast to version 1.20:

  • Add *.typekit.net, stackpath.bootstrapcdn.com to CSS whitelist.
  • Don’t apply rot13 on url-encoded characters.
  • Use valid value for script type to quiet W3C validator.

1.18

Update Phast to version 1.18:

  • Don’t rewrite page-relative fragment image URLs like fill: url(#destination).

1.17

Update Phast to version 1.17:

  • Restore script attributes in sorted order (that is, src before type) to stop Internet Explorer from running scripts twice when they have src and type set.

1.16

  • Add phastpress_disable hook.

1.15

  • Fix an issue whereby updating to 1.14 would reset the security token, invalidating links used in pages in a full-page cache. (To fix the issue, clear the cache of your full-page caching plugin.)

1.14

  • Use the correct service URL when the site URL changes after activation.

Update Phast to version 1.16:

  • Encode bundler request query to avoid triggering adblockers.
  • Use a promise to delay bundler requests until the end of the event loop, rather than setTimeout.

1.13

Update Phast to version 1.15:

  • Scripts can now be loaded via document.write. This restores normal browser behaviour.

1.12

Update Phast to version 1.14:

  • document.write now immediately inserts the HTML into the page. This fixes compatibility with Google AdSense.

1.11.0

Update Phast to version 1.13.1:

  • Remove query strings from URLs to stylesheets and scripts loaded from the local server. It is redundant, since we add the modification time to the URL ourselves.

1.10.3

  • Add version information to console log.
  • Fix notice regarding undefined variable in settings panel.

1.10.2

Update Phast to version 1.12.2:

  • Increase timeouts for API connection.

1.10.1

Update Phast to version 1.12.1:

  • Don’t use IndexedDB-backed cache on Safari.

1.10.0

  • Use HTTPS for the API connection.

Update Phast to version 1.12.0:

  • Rewrite data-lazy-src and data-lazy-srcset on img, source tags for compatibility with lazy loading via BJ Lazy Load, possibly other plugins.

1.9.0

  • Removed script rearrangement setting.

Update Phast to version 1.11.0:

  • Proxy CSS for maxcdn.bootstrapcdn.com, idangero.us, *.github.io.
  • Proxy icon fonts and other resources from fonts.googleapis.com.
  • Improve log messages from image filter.
  • Do not proxy maps.googleapis.com, to fix NotLoadingAPIFromGoogleMapError.
  • Removed src attribute from scripts that are loaded through the bundler, so that old versions of Firefox do not make extraneous downloads.
  • Check that the bundler returns the right amount of responses.
  • Per-script debugging message when executing scripts.
  • Animated GIFs are no longer processed, so that animation is preserved.

1.8.5

  • Disable PhastPress for Elementor previews (edit mode).

1.8.4

  • Fix installation notice dismissal.

Update Phast to version 1.9.3:

  • <!-- comments in inline scripts are removed only at the beginning.

1.8.3

Update Phast to version 1.9.2:

  • Empty scripts are cached correctly.

1.8.2

Update Phast to version 1.9.1:

  • Async scripts are now not loaded before sync scripts that occur earlier in the document.

1.8.1

Update Phast to version 1.9.0:

  • Scripts are now retrieved in a single request.
  • Non-existent filter classes are ignored, and an error is logged.
  • A ‘dummy filename’ such as __p__.js is appended to service requests to trick Cloudflare into caching those responses.
  • The maximum document size for filters to be applied was corrected to be 1 MiB, not 1 GiB

1.8.0

This release was built with a pre-release version of Phast 1.9.0 that caused incorrect triggering of the browser load event. Please upgrade to PhastPress 1.8.1.

1.7.0

  • Update Phast to version 1.8.0.

1.6.2

  • Do not regenerate the service request token on every configuration change or plugin update.

1.6.1

  • Fix issue with CSS not respecting disabled path info setting.

1.6.0

  • Update Phast to commit 9e1471a.
  • Fix MyParcel (and possibly other plugins) compatibility by not optimizing any pages but WordPress’ index.php.

1.5.3

  • Revamped the settings panel.

1.5.2

  • Remove old notice about sending admin email.

See Phast change log

1.5.1b

  • The admin email is no longer sent to the image optimisation API.

1.5.1a

  • Update to Phast 1.5.1.

See Phast change log

1.5.1

  • Disable scripts rearrangement by default.

This version was based on Phast 1.5.0.

1.5.0

See Phast change log

1.4.0

  • Add automatically configured option to use query strings rather than path info for service requests.
  • Automatically enable PhastPress if everything seems fine.
  • Use WordPress’ Requests library instead of cURL.

See Phast change log

1.3.2

  • PhastPress is now automatically enabled on installation.
  • The image optimisation API is now automatically enabled on installation.

See Phast change log

1.3.1

See Phast change log

1.3.0

  • PhastPress now works on Windows.

See Phast change log

1.2.0

See Phast change log

1.1.0

See Phast change log