Skip to content

Commit

Permalink
Bumped version to 0.5.3.
Browse files Browse the repository at this point in the history
Updated readme.
  • Loading branch information
hexydec committed Sep 10, 2021
1 parent 6c56cb2 commit 06b7d59
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
20 changes: 11 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@ The plugin also includes a suite of security features to help you secure your we

Depending on how compressible you content is you can expect ~10 - 15% compression of your page before gzip compression, after gzip you can expect ~5 - 10%.

### What are the tradeoffs for minifying my HTML?
### How long does it take to minify my page?

You are swapping the time it takes to send the extra bytes down the wire to your clients for extra CPU time on the server.
You can tick the "Show stats in the console" option to see how long it takes to minify your page and what compression was achieved, view the output in the developer console (Press F12).

Torque uses my other project HTMLdoc to minify your code, it has been designed to use on the fly and has been optimised for speed. Even so I recommend you use some sort of cache in front of your PHP code to make sure your time-to-first-byte is optimised, then the extra CPU time doesn't matter.
Note that inline CSS and Javascript is cached in a Wordpress transient, so if you page has inline code, it should be faster after first run.

### How long does it take to minify my page?
### What are the tradeoffs for minifying my HTML?

You can tick the "Show stats in the console" option to see how long it takes to minify your page, view the output in the developer console (Press F12).
You are swapping the time it takes to send the extra bytes down the wire to your clients for extra CPU time on the server.

Note that inline CSS and Javascript is cached in a Wordpress transient, so if you page has inline code, it should be faster after first run.
Torque uses my other project HTMLdoc to minify your code, it has been designed to use on the fly and has been optimised for speed. Even so I recommend you use some sort of cache in front of your PHP code to make sure your time-to-first-byte is optimised, then the extra CPU time doesn't matter.

### How can I test if my page is faster after using your plugin?

The best tool to use if Lighthouse, which is built into Blink based browsers such as Chrome, Edge and others:
The best tool to use is Lighthouse, which is built into Blink based browsers such as Chrome, Edge and others:

- Press F12 to bring up the developer tools
- Select the "Lighthouse" tab
Expand All @@ -77,9 +77,11 @@ Other minification plugins blindly find and replace patterns within your code to

All three libraries have automated test suites to ensure reliability, and should outperform other PHP based minifiers in terms of compression.

### How do I setup my Content-Security-Policy?
### What is Content Security Policy?

Content Security Policy (CSP) is a very powerful browser security feature that only enables assets to be downloaded from the specified domains. Any assets that are downloaded from domains that are not listed will be blocked.

Content-Security-Policy (CSP) is a very powerful browser security feature that only enables assets to be downloaded from the specified domains. Any assets that are downloaded from domains that are not listed will be blocked.
### How do I setup my Content-Security-Policy?

Using the developer tools in your browser (Press F12), look at the network tab on each page, and note down the domains that are used for different assets, along with their asset type. You can then enter those domains in to the relevant CSP boxes. Be sure to run any extra features of your website that use Fetch or XHR, as these connections are also bound by CSP.

Expand Down
20 changes: 11 additions & 9 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ It is recommended that you do not use this plugin with other minification plugin

Depending on how compressible you content is you can expect ~10 - 15% compression of your page before gzip compression, after gzip you can expect ~5 - 10%.

= What are the tradeoffs for minifying my HTML? =
= How long does it take to minify my page?

You are swapping the time it takes to send the extra bytes down the wire to your clients for extra CPU time on the server.
You can tick the "Show stats in the console" option to see how long it takes to minify your page and what compression was achieved, view the output in the developer console (Press F12).

Torque uses my other project HTMLdoc to minify your code, it has been designed to use on the fly and has been optimised for speed. Even so I recommend you use some sort of cache in front of your PHP code to make sure your time-to-first-byte is optimised, then the extra CPU time doesn't matter.
Note that inline CSS and Javascript is cached in a Wordpress transient, so if you page has inline code, it should be faster after first run.

= How long does it take to minify my page? =
= What are the tradeoffs for minifying my HTML? =

You can tick the "Show stats in the console" option to see how long it takes to minify your page, view the output in the developer console (Press F12).
You are swapping the time it takes to send the extra bytes down the wire to your clients for extra CPU time on the server.

Note that inline CSS and Javascript is cached in a Wordpress transient, so if you page has inline code, it should be faster after first run.
Torque uses my other project HTMLdoc to minify your code, it has been designed to use on the fly and has been optimised for speed. Even so I recommend you use some sort of cache in front of your PHP code to make sure your time-to-first-byte is optimised, then the extra CPU time doesn't matter.

= How can I test if my page is faster after using your plugin? =

The best tool to use if Lighthouse, which is built into Blink based browsers such as Chrome, Edge and others:
The best tool to use is Lighthouse, which is built into Blink based browsers such as Chrome, Edge and others:

* Press F12 to bring up the developer tools
* Select the "Lighthouse" tab
Expand All @@ -99,9 +99,11 @@ HTMLdoc is a compiler, it parses your code to an internal representation, optimi

All three libraries have automated test suites to ensure reliability, and should outperform other PHP based minifiers in terms of compression.

= How do I setup my Content-Security-Policy? =
= What is Content Security Policy? =

Content Security Policy (CSP) is a very powerful browser security feature that only enables assets to be downloaded from the specified domains. Any assets that are downloaded from domains that are not listed will be blocked.

Content-Security-Policy (CSP) is a very powerful browser security feature that only enables assets to be downloaded from the specified domains. Any assets that are downloaded from domains that are not listed will be blocked.
= How do I setup my Content Security Policy? =

Using the developer tools in your browser (Press F12), look at the network tab on each page, and note down the domains that are used for different assets, along with their asset type. You can then enter those domains in to the relevant CSP boxes. Be sure to run any extra features of your website that use Fetch or XHR, as these connections are also bound by CSP.

Expand Down
2 changes: 1 addition & 1 deletion torque.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Plugin Name: Torque - Optimise the transport of your Website
Plugin URI: https://github.com/hexydec/torque
Description: Make your Wordpress website noticably faster by optimising how it is delivered. Analyse your website's performance and security, minify and combine your assets, and configure an array of performance and security settings quickly and easily with this comprehensive plugin. Achieves the best compression of any minification plugin.
Version: 0.5.2
Version: 0.5.3
Requires PHP: 7.3
Author: Hexydec
Author URI: https://github.com/hexydec/
Expand Down

0 comments on commit 06b7d59

Please sign in to comment.