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

Change "Exclude inline JS" arrays to a JSON / XML file #1860

Closed
crystinutzaa opened this issue Jul 25, 2019 · 5 comments
Closed

Change "Exclude inline JS" arrays to a JSON / XML file #1860

crystinutzaa opened this issue Jul 25, 2019 · 5 comments
Labels
duplicate Indicates similar issues or pull requests module: file optimization priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement

Comments

@crystinutzaa
Copy link
Contributor

There are a couple of large arrays related to exclude inline JS, exclude external JS file path, get_move_after_inline_scripts, CPCSS exclusions. Some of these arrays it seems that lately are growing really fast.

A possible solution would be to export those to a JSON / XML file. Also we can add some extra infos related to each exclusion (eg. plugin name) so in the future we can easily identify and group the JS, CPCSS incompatibilities with third party plugins.

@Tabrisrp Tabrisrp added module: file optimization type: enhancement Improvements that slightly enhance existing functionality and are fast to implement waiting for feedback labels Jul 26, 2019
@Tabrisrp
Copy link
Contributor

I was thinking about this and something even better might be to maintain those lists on our side, and make them available using an API. The returned values could be saved in a transient for a week before the next call to the API.

This is offering several advantages:

  • Updating the exclusions doesn't require a plugin update anymore
  • The code itself is freed from those big arrays

@crystinutzaa
Copy link
Contributor Author

This is a brilliant idea! No more updates for minor issues like exclusions

@GeekPress
Copy link
Contributor

@Tabrisrp Excellent idea! It will avoid us to wait a new version to include new exclusions.

I have a question:
What will happen if the customer's server is blocking external call? Do we have a notice about that? How will it work?

@Tabrisrp
Copy link
Contributor

I didn't think about the detailed implementation yet. But we would have to display a notice somewhere about it yes, when the option is enabled.

I also think we have other enhancements to try before, around inline script detection/exclusion, notably #2064

@GeekPress GeekPress added this to the 3.7 milestone Jun 11, 2020
@GeekPress GeekPress modified the milestones: 3.7, 3.8 Jul 7, 2020
@GeekPress GeekPress removed this from the 3.8 milestone Sep 15, 2020
@arunbasillal arunbasillal added priority: low Issues that can wait and removed waiting for feedback labels Oct 9, 2020
@GeekPress GeekPress added the duplicate Indicates similar issues or pull requests label Apr 21, 2021
@GeekPress
Copy link
Contributor

Duplicate of #3602

@GeekPress GeekPress marked this as a duplicate of #3602 Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Indicates similar issues or pull requests module: file optimization priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

No branches or pull requests

4 participants