A tool that extracts inline JavaScript from HTML files to enable Content Security Policy compliance.
Crisper is a Node.js tool that extracts inline JavaScript from HTML files into separate external files. It solves the problem of Content Security Policy (CSP) compliance by eliminating the need for unsafe-inline directives, allowing developers to implement stricter security policies.
Web developers and security engineers working on projects that require CSP compliance, particularly those using Polymer or build tools like Vulcanize, Gulp, or Grunt.
Developers choose Crisper because it provides a simple, automated way to achieve CSP compliance without manual refactoring, integrates with popular build tools, and supports advanced CSP features like hash-based strict-dynamic policies.
Crisper is a utility that processes HTML files by separating inline JavaScript into external files, making it easier to implement Content Security Policy (CSP) restrictions. It helps developers avoid unsafe-inline directives by moving scripts to external resources that can be safely whitelisted.
<script> tags from HTML and writes them to a separate .js file.<head> (default for performance) or at the end of <body> (for document.write compatibility).Crisper follows a pragmatic approach to CSP compliance, prioritizing security without sacrificing developer workflow by integrating seamlessly with existing build processes.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically extracts all inline <script> tags from HTML into external files, eliminating the need for unsafe-inline CSP directives and reducing manual effort.
Seamlessly works with Vulcanize for Polymer projects and has official plugins for Gulp and Grunt, making it easy to incorporate into existing build workflows.
Supports hash-based and strict-dynamic CSP policies via the --csp-hashable-script-loader option, enabling stricter security configurations without compromising functionality.
Defaults to placing scripts in the <head> with defer, which improves page load performance by allowing parallel parsing of HTML and JavaScript, as noted in the README.
Version 2.x introduced breaking changes like removing the deprecated split API and changing default behavior, requiring manual adjustments and potentially breaking existing implementations.
Primarily optimized for Polymer and Vulcanize workflows, making it less versatile for projects using other frameworks or without specific build tool integrations.
Requires configuration and integration into build systems like Gulp or Grunt, which can add overhead for simple projects or teams unfamiliar with these tools.