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

1.0.0 #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

1.0.0 #1

wants to merge 4 commits into from

Conversation

msigley
Copy link

@msigley msigley commented May 23, 2017

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
Copy link
Author

msigley commented May 23, 2017

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

@clifgriffin
Copy link

Hmm, so why only use the CDN for images?

@msigley
Copy link
Author

msigley commented May 23, 2017

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.

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
Copy link
Author

msigley commented May 25, 2017

@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