Skip to content

Commit

Permalink
Improve description for htaccess 'Access-Control-Allow-Origin' option.
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Jun 27, 2016
1 parent bb3bae0 commit 4e29d12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/includes/classes/MenuPageOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1054,8 +1054,8 @@ public function __construct()
echo ' <p>'.__('<a href="https://cometcache.com/r/google-developers-gzip-compression/" target="_blank">GZIP compression</a> is highly recommended. It\'s not uncommon to achieve compression rates as high as 70-90%, which is a huge savings in the amount of data that needs to be transferred with each visit to your site.', SLUG_TD).'</p>'."\n";
echo ' <p>'.sprintf(__('%1$s fully supports GZIP compression on its output. However, it does not handle GZIP compression directly like some caching plugins. We purposely left GZIP compression out of this plugin because GZIP compression is something that should really be enabled at the Apache level or inside your <code>php.ini</code> file. GZIP compression can be used for things like JavaScript and CSS files as well, so why bother turning it on for only WordPress-generated pages when you can enable GZIP at the server level and cover all the bases!', SLUG_TD), esc_html(NAME)).'</p>'."\n";
echo ' <p><select name="'.esc_attr(GLOBAL_NS).'[saveOptions][htaccess_gzip_enable]" data-target=".-htaccess-gzip-enable-options">'."\n";
echo ' <option value="0"'.(!IS_PRO ? '' : selected($this->plugin->options['htaccess_gzip_enable'], '0', false)).'>'.__('No, do NOT enable GZIP Compression (or I\'ll update my configuration manually; see below)', SLUG_TD).'</option>'."\n";
echo ' <option value="1"'.(!IS_PRO ? '' : selected($this->plugin->options['htaccess_gzip_enable'], '1', false)).'>'.__('Yes, enable GZIP Compression (recommended)', SLUG_TD).'</option>'."\n";
echo ' <option value="0"'.selected($this->plugin->options['htaccess_gzip_enable'], '0', false).'>'.__('No, do NOT enable GZIP Compression (or I\'ll update my configuration manually; see below)', SLUG_TD).'</option>'."\n";
echo ' <option value="1"'.selected($this->plugin->options['htaccess_gzip_enable'], '1', false).'>'.__('Yes, enable GZIP Compression (recommended)', SLUG_TD).'</option>'."\n";
echo ' </select></p>'."\n";
echo ' <p>'.__('Or, you can update your configuration manually: [<a href="#" data-toggle-target=".'.esc_attr(GLOBAL_NS.'-apache-optimizations--gzip-configuration').'"><i class="si si-eye"></i> .htaccess configuration <i class="si si-eye"></i></a>]', SLUG_TD).'</p>'."\n";
echo ' <div class="'.esc_attr(GLOBAL_NS.'-apache-optimizations--gzip-configuration').'" style="display:none; margin-top:1em;">'."\n";
Expand Down Expand Up @@ -1105,7 +1105,7 @@ public function __construct()
if ($this->plugin->options['cdn_enable'] && !$this->plugin->options['htaccess_access_control_allow_origin']) {
echo ' <p class="warning" style="display:block;">'.__('<strong>Warning:</strong> Send Access-Control-Allow-Origin Header has been disabled below but <strong>Comet Cache → Plugin Options → Static CDN Filters</strong> are enabled. We recommend configuring your server to send the <code>Access-Control-Allow-Origin</code> header to avoid <a href="https://cometcache.com/r/kb-article-what-are-cross-origin-request-blocked-cors-errors/" target="_blank">CORS errors</a> when a CDN is configured.', SLUG_TD).'</p>'."\n";
}
echo ' <p>'.__('When you are using Static CDN Filters to load resources for your site from another domain, it\'s important that your server sends an <code>Access-Control-Allow-Origin</code> header to prevent Cross Origin Resource Sharing (CORS) errors. This option is enabled automatically when you enable Static CDN Filters. For more information, see <a href="https://cometcache.com/r/kb-article-what-are-cross-origin-request-blocked-cors-errors/" target="_blank">this article</a>.', SLUG_TD).'</p>'."\n";
echo ' <p>'.__('If you are using Static CDN Filters to load resources for your site from another domain, it\'s important that your server sends an <code>Access-Control-Allow-Origin</code> header to prevent Cross Origin Resource Sharing (CORS) errors. This option is enabled automatically when you enable Static CDN Filters. For more information, see <a href="https://cometcache.com/r/kb-article-what-are-cross-origin-request-blocked-cors-errors/" target="_blank">this article</a>.', SLUG_TD).'</p>'."\n";
echo ' <p><select name="'.esc_attr(GLOBAL_NS).'[saveOptions][htaccess_access_control_allow_origin]" data-target=".-htaccess-access-control-allow-origin-options">'."\n";
echo ' <option value="0"'.(!IS_PRO ? '' : selected($this->plugin->options['htaccess_access_control_allow_origin'], '0', false)).'>'.__('No, do NOT send the Access-Control-Allow-Origin header (or I\'ll update my configuration manually; see below)', SLUG_TD).'</option>'."\n";
echo ' <option value="1"'.(!IS_PRO ? 'selected' : selected($this->plugin->options['htaccess_access_control_allow_origin'], '1', false)).'>'.__('Yes, send the Access-Control-Allow-Origin header (recommended for Static CDN Filters)', SLUG_TD).'</option>'."\n";
Expand Down

0 comments on commit 4e29d12

Please sign in to comment.