Giter VIP home page Giter VIP logo

pimcore-minify's Introduction

This plugin is already abandoned and will not be continued further on. If you want, you still can use it for Pimcore <= 4.

Minify for Pimcore

This Plugin minifies all the JS and CSS Files included in your Project.

Online works when your not logged in to ADMIN and disabled DEBUG Mode

pimcore-minify's People

Contributors

cruiser13 avatar dpfaffenbauer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cruiser13

pimcore-minify's Issues

Improvement: faster cache handling

It seems cache is handled by a md5 of all the content.
So before checking the cache, all file are readed, parsed, concatened. And finally a md5 is done (can be long on so much long datas if many CSS are combined).
At each HTML server query the process is made again.

Do you think it could be improved ? I get two ideas for this:

1- The more easy to implement
I thing by checking modification dates and make a md5 of this (a concat of all last modification dates of the files). And after if not cached we parse the content of the file (it will make 2 access to each files, one for checking last modification date and another for content, but maybe will be faster in the end as when it will be cached just the date will be checked).

2- Maybe this one need a more complex rewriting
I guess the included cache in mrclay/minify is not used actually ? (as it seems some cache technics are implemented, see here please: https://github.com/mrclay/minify/blob/master/docs/CookBook.wiki.md). Maybe we could rely one those ? (but for this i think we should change the way it work by using the htaccess combination, see the github homepage of the projet, they talk about http://example.org/min/?f=min/quick-test.css).

Minify is generating invalid markup (HTML validation fails) because of async

If minify is used, the following code will be generated by the plugin (for example):
<script type="text/javascript" async="false" src="/website/var/tmp/minified_javascript_0ea1ea04310d23b1aec1c1b43e9dc116.js"></script>

This does cause the following error in HTML Validation (W3C):
Bad value “false” for attribute “async” on element “script”.

The HTML 5 specification does accept something like this:
<script type="text/javascript" async src="/16.js"></script>
But it does not allow the opposite.

I'm not sure how to fix that without loosing the valid async functionality.

Minify works but adds weird stuff

Hello,
the minifying system works, thanks. But it does add a // ma to every page in my tests.

I could not find it in the code so I'm unsure what is causing this issue.
Any support would be great.

minified_javascript is generated but not displayed

I successfully installed this plugin in Pimcore and it seems to work. I do see a lot of minified_javascript files in my /tmp directory. But the website iteself does not change, it does still have the uncompressed .JS files in the source code.

Am I missing something?

There are no minified_css files in /tmp although there are .CSS files used in the layout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.