Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matdave/pageshrink
Automatically shrink the ouput on MODX Resources
https://github.com/matdave/pageshrink
Last synced: about 2 months ago
JSON representation
Automatically shrink the ouput on MODX Resources
- Host: GitHub
- URL: https://github.com/matdave/pageshrink
- Owner: matdave
- Created: 2023-04-05T21:52:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T20:27:35.000Z (5 months ago)
- Last Synced: 2024-11-23T03:51:31.326Z (2 months ago)
- Language: PHP
- Size: 26.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MODX PageShrink
MODX PageShrink is a MODX Revolution Extra that allows you to shrink the size of your MODX pages by removing unnecessary
whitespace and comments from the HTML output.## Installation
1. Download the latest release from the [MODX Extras Repository](http://modx.com/extras/package/pageshrink) or via the
MODX Package Browser.
2. Install the package via the MODX Package Manager.## System Settings
| Key | Default | Description |
|----------------------------------|---------|----------------------------------------------------------------------------------|
| pageshrink.cache_resource_shrink | 1 | Cache the shrunk version of the resource. |
| pageshrink.resource_shrink | 1 | Shrink the output of a resource (useful for disabling per context or user group) |## Usage
MODX PageShrink is enabled by default. The shrunk version of the resource is also cached by default. You can disable the
cache globally by setting the `pageshrink.cache_resource_shrink` system setting to `0`.It is recommended to keep the page cache enabled. If you have specific resources that you do not want to cache, you can
disable the cache for those resources by setting the `cacheable` property to `0` in the resource's settings. This would
apply to things like forms, pages with pagination, etc., where the painted content of the page will change based on a
user interaction or request variable. PageShrink will attempt to detect these types of pages and create a new cache, but
there may be some edge cases where it does not work as expected.