Skip to content

1.0.0#1

Open
msigley wants to merge 4 commits into
Objectivco:masterfrom
msigley:master
Open

1.0.0#1
msigley wants to merge 4 commits into
Objectivco:masterfrom
msigley:master

Conversation

@msigley

@msigley msigley commented May 23, 2017

Copy link
Copy Markdown

Added 'WP_STACK_CDN_THEME' constant for CDN resources in the current theme.
Renamed 'WP_STACK_CDN_UPLOADS_ONLY' constant to 'WP_STACK_CDN_UPLOADS'.
Added 'wp_stack_cdn_filter_urls' filter for filtering custom base urls.
Added dns-prefetch hint for CDN domain.
Reworked init function to streamline logic for additional features.

Added 'WP_STACK_CDN_THEME' constant for CDN resources in the current theme.
Renamed 'WP_STACK_CDN_UPLOADS_ONLY' constant to 'WP_STACK_CDN_UPLOADS'.
Added 'wp_stack_cdn_filter_urls' filter for filtering custom base urls.
Added dns-prefetch hint for CDN domain.
Reworked init function to streamline logic for additional features.
@msigley

msigley commented May 23, 2017

Copy link
Copy Markdown
Author

Using this version of the plugin I was able to implement an image only CDN filter on a Shopp site.

@clifgriffin

Copy link
Copy Markdown

Hmm, so why only use the CDN for images?

@msigley

msigley commented May 23, 2017

Copy link
Copy Markdown
Author

Render blocking resources like css and js in the mostly. Loading these types of resources from an different domain adds a noticable lag in the render time.

Also the previous implementation was an all or nothing approach to url replacement. The new 'wp_stack_cdn_filter_urls' filter allows for custom url replacements to be done as a nice middle ground.

There is also the issue of content security policies and loading JS from a different domain. Some scripts will only execute properly when run from the same domain as the website.

msigley added 2 commits May 24, 2017 16:16
Added 'WP_STACK_CDN_FORCE_HTTPS' definition for enabling/disabling https forcing.
Added WP_Stack_CDN_get_url() API function.
Implemented singleton.
This bug prevented urls in inline-block layouts from being replaced.
@msigley

msigley commented May 25, 2017

Copy link
Copy Markdown
Author

@clifgriffin I added several more fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants