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

Add html, css, and js compression to Flask responses #996

Closed
michplunkett opened this issue Jul 29, 2023 · 1 comment · Fixed by #999
Closed

Add html, css, and js compression to Flask responses #996

michplunkett opened this issue Jul 29, 2023 · 1 comment · Fixed by #999
Assignees

Comments

@michplunkett
Copy link
Collaborator

What issue are you seeing?

Presuming this pull request, mrf345/flask_minify#86, goes through, we should be able to get our server responses minified fairly quickly using flask_minify.

@michplunkett
Copy link
Collaborator Author

Flask-Minify breaks our tests, but it does work when actually visiting the site, gonna try Flask-Compress instead.

@michplunkett michplunkett linked a pull request Jul 31, 2023 that will close this issue
3 tasks
@michplunkett michplunkett changed the title Add html, css, and js minifying to Flask responses Add html, css, and js compression to Flask responses Jul 31, 2023
michplunkett added a commit that referenced this issue Aug 1, 2023
## Fixes issue
#996

## Description of Changes
Added gzip compression to HTML, JS, and CSS file responses via the
[`Flask-Compress`
package](https://github.com/colour-science/flask-compress).

Network tab of `http://localhost:3000/department/1` without compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 36 41 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/1ab41e56-a976-4e3c-83dc-fe3ef0bac16a">

Network tab of `http://localhost:3000/department/1` with compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 32 38 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/fc09cbec-17b9-4640-9a9d-2348a1b973d3">


## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this issue Sep 24, 2023
## Fixes issue
lucyparsons#996

## Description of Changes
Added gzip compression to HTML, JS, and CSS file responses via the
[`Flask-Compress`
package](https://github.com/colour-science/flask-compress).

Network tab of `http://localhost:3000/department/1` without compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 36 41 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/1ab41e56-a976-4e3c-83dc-fe3ef0bac16a">

Network tab of `http://localhost:3000/department/1` with compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 32 38 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/fc09cbec-17b9-4640-9a9d-2348a1b973d3">


## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this issue Sep 25, 2023
## Fixes issue
lucyparsons#996

## Description of Changes
Added gzip compression to HTML, JS, and CSS file responses via the
[`Flask-Compress`
package](https://github.com/colour-science/flask-compress).

Network tab of `http://localhost:3000/department/1` without compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 36 41 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/1ab41e56-a976-4e3c-83dc-fe3ef0bac16a">

Network tab of `http://localhost:3000/department/1` with compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 32 38 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/fc09cbec-17b9-4640-9a9d-2348a1b973d3">


## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
AetherUnbound pushed a commit to OrcaCollective/OpenOversight that referenced this issue Oct 9, 2023
## Fixes issue
lucyparsons#996

## Description of Changes
Added gzip compression to HTML, JS, and CSS file responses via the
[`Flask-Compress`
package](https://github.com/colour-science/flask-compress).

Network tab of `http://localhost:3000/department/1` without compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 36 41 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/1ab41e56-a976-4e3c-83dc-fe3ef0bac16a">

Network tab of `http://localhost:3000/department/1` with compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 32 38 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/fc09cbec-17b9-4640-9a9d-2348a1b973d3">


## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
AetherUnbound pushed a commit to OrcaCollective/OpenOversight that referenced this issue Oct 9, 2023
## Fixes issue
lucyparsons#996

## Description of Changes
Added gzip compression to HTML, JS, and CSS file responses via the
[`Flask-Compress`
package](https://github.com/colour-science/flask-compress).

Network tab of `http://localhost:3000/department/1` without compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 36 41 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/1ab41e56-a976-4e3c-83dc-fe3ef0bac16a">

Network tab of `http://localhost:3000/department/1` with compression:
<img width="821" alt="Screenshot 2023-07-31 at 12 32 38 PM"
src="https://github.com/lucyparsons/OpenOversight/assets/5885605/fc09cbec-17b9-4640-9a9d-2348a1b973d3">


## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
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 a pull request may close this issue.

1 participant