Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Serve images referenced in CSS via Static CDN Filters #461

Closed
raamdev opened this issue Mar 31, 2015 · 4 comments
Closed

Feature Request: Serve images referenced in CSS via Static CDN Filters #461

raamdev opened this issue Mar 31, 2015 · 4 comments

Comments

@raamdev
Copy link
Contributor

@raamdev raamdev commented Mar 31, 2015

The Static CDN Filters do not currently (as of v150314) filter images referenced in CSS to have those images served via the configured CDN. It would be good if there was an option to do this.

@jaswsinc writes...

The HTML Compressor does rewrite these, in order to resolve relative paths that would break once CSS files are combined. We recently added support for Static CDN Filters in the HTML Compressor, so taking that a step further and applying it to CSS resources would not be that difficult.

Since the HTML Compressor already rewrites these paths during compression, we can simply add an option to the Static CDN Filters called "Rewrite Static Resource URLs in CSS Files?" (cdn_rewrite_css_urls) that would then be passed to the HTML Compressor, along with cdn_host, to be used for determining whether or not paths inside CSS files should be replaced with the CDN host URL.

If cdn_rewrite_css_urls is enabled, then during the processing of CSS compression, all paths would be replaced with paths to the CDN.


Next Actions

@isaumya
Copy link

@isaumya isaumya commented Mar 31, 2015

It's great that you have added my request as a feature request. Looking forward to see the improvements. :)

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented May 12, 2015

@jaswsinc Can you confirm that wpsharks/html-compressor#58 closes this issue (that is once ZenCache has been updated to the latest version of HTML Compressor)?

@jaswrks
Copy link

@jaswrks jaswrks commented May 12, 2015

Correctamundo :-) 👍

@raamdev raamdev added this to the Next Release milestone May 12, 2015
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented May 16, 2015

Next release changelog:

  • Enhancement: Static CDN Filters now also apply to any static files that are referenced inside CSS files. Props @jaswsinc. See Issue #461.
@raamdev raamdev closed this May 16, 2015
raamdev added a commit that referenced this issue Jun 5, 2015
**RELEASE CANDIDATE**

- **New Feature!** The free version of ZenCache now supports several new options that were previously only available in the Pro version. You can now toggle the Auto-Clear Cache routines for the Home Page, Posts Page, Author Page, Category Archives, Tag Archives, Custom Term Archives, RSS/RDF/Atom Feeds, and XML Sitemaps. This gives you more control over exactly when ZenCache purges the cache for these parts of your site. See _ZenCache → Plugin Options → Clearing the Cache_ for further details.
- **New Feature!** URI Exclusion Patterns are now available in ZenCache Lite! This previously Pro-only feature is now available in the free version of ZenCache and allows you to exclude a list of URIs from being cached by ZenCache. See _ZenCache → Plugin Options → URI Exclusion Patterns_ for further details.
- **New Feature!** HTTP Referrer Exclusion Patterns are now available in ZenCache Lite! This previously Pro-only feature is now available in the free version of ZenCache and allows you to define a list of referring URLs or domains that send you traffic. When ZenCache sees a request coming from one of those URLs or domains, it will not cache that particular request. See _ZenCache → Plugin Options → HTTP Referrer Exclusion Patterns_ for further details.
- **New Pro Feature!**: HTML Compression now supports compressing JSON (in addition to the already supported HTML, JavaScript, and CSS compression). Props @jaswsinc. See [Issue #469](#469).
- **New Pro Feature!**: Static CDN Filters now supports multiple CDN hostnames. This allows you to configure more than one CDN hostname, also referred to as Domain Sharding. This makes it possible for site owners to work around web browser concurrency limits, allowing the browser to download many resources simultaneously, which increases overall speed. Props to @isaumya and @jaswsinc. See [Issue #468](#468).
- **Enhancement** (Pro): Static CDN Filters now also apply to any static files that are referenced inside CSS files. Props @jaswsinc. See [Issue #461](#461).
- **Enhancement**: Completed a major restructure of the entire codebase to improve modularity and dependency management. Props @jaswsinc.
- **Enhancement** (Pro): Static CDN Filters now supports the ability to configure separate CDN hostname(s) for each domain (or sub-domain) that you run in a WordPress Multisite Network. Props @jaswsinc. See [Issue #475](#475).
- **Enhancement** (Pro): Static CDN Filters now support sub-domains when ZenCache is running inside a WordPress Multisite Network. Props @jaswsinc. See [Issue #439](#439).
- **Bug Fix** (Pro): Static CDN Filters were not being applied to the primary site on WP Multisite installations that used subdomains. (While subdomains are not currently supported by Static CDN Filters, the primary site can still use this feature.) Props to @isaumya for discovering this bug. See [Issue #470](#470).
raamdev added a commit that referenced this issue Jun 27, 2015
- **Restructured Codebase**: The entire ZenCache codebase has been restructured to improve performance, enhance flexibility, and make it easier to build in new features!
- **New Feature!** The free version of ZenCache now supports several new options that were previously only available in the Pro version. You can now toggle the Auto-Clear Cache routines for the Home Page, Posts Page, Author Page, Category Archives, Tag Archives, Custom Term Archives, RSS/RDF/Atom Feeds, and XML Sitemaps. This gives you more control over exactly when ZenCache purges the cache for these parts of your site. See _ZenCache → Plugin Options → Clearing the Cache_ for further details.
- **New Feature!** URI Exclusion Patterns are now available in ZenCache Lite! This previously Pro-only feature is now available in the free version of ZenCache and allows you to exclude a list of URIs from being cached by ZenCache. See _ZenCache → Plugin Options → URI Exclusion Patterns_ for further details.
- **New Feature!** HTTP Referrer Exclusion Patterns are now available in ZenCache Lite! This previously Pro-only feature is now available in the free version of ZenCache and allows you to define a list of referring URLs or domains that send you traffic. When ZenCache sees a request coming from one of those URLs or domains, it will not cache that particular request. See _ZenCache → Plugin Options → HTTP Referrer Exclusion Patterns_ for further details.
- **New Pro Feature!**: HTML Compression now supports compressing JSON (in addition to the already supported HTML, JavaScript, and CSS compression). Props @jaswsinc. See [Issue #469](#469).
- **New Pro Feature!**: Static CDN Filters now supports multiple CDN hostnames. This allows you to configure more than one CDN hostname, also referred to as Domain Sharding. This makes it possible for site owners to work around web browser concurrency limits, allowing the browser to download many resources simultaneously, which increases overall speed. Props to @isaumya and @jaswsinc. See [Issue #468](#468).
- **Enhancement** (Pro): Static CDN Filters now includes proper support for WordPress Multisite Networks, including support for subdomains (full support for Domain Mapping coming in the next release). If you're running a WordPress Multisite Network and want to configure a CDN, see [this KB Article](http://zencache.com/kb-article/static-cdn-filters-for-wordpress-multisite-networks/) for further details.
- **Enhancement** (Pro): Static CDN Filters now also apply to any static files that are referenced inside CSS files. Props @jaswsinc. See [Issue #461](#461).
- **Enhancement**: Completed a major restructure of the entire codebase to improve modularity and dependency management. Props @jaswsinc.
- **Enhancement** (Pro): Static CDN Filters now supports the ability to configure separate CDN hostname(s) for each domain (or subdomain) that you run in a WordPress Multisite Network. Props @jaswsinc. See [Issue #475](#475).
- **Enhancement** (Pro): Static CDN Filters now support subdomains when ZenCache is running inside a WordPress Multisite Network. Props @jaswsinc. See [Issue #439](#439).
- **Bug Fix** (Pro): Static CDN Filters were not being applied to the primary site on WP Multisite installations that used subdomains. Props to @isaumya for discovering this bug. See [Issue #470](#470).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants