Download the PHP package asyrafhussin/laravel-page-speed without Composer

On this page you can find all versions of the php package asyrafhussin/laravel-page-speed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-page-speed

Forked From renatomarinho/laravel-page-speed

Laravel Page Speed [Support Laravel 5.7]

Simple package to minify HTML output on demand which results in a 35%+ optimization.

Installation is easy

You can install the package via composer:

Laravel 5.5 and up

You don't have to do anything else, this package uses the Package Auto-Discovery feature, and should be available as soon as you install it via Composer.

Laravel 5.4 or 5.3

Add the Service Provider to your config/app.php: AsyrafHussin\LaravelPageSpeed\ServiceProvider::class

This is required for publishing the configuration file:

Publish configuration file

php artisan vendor:publish --provider="AsyrafHussin\LaravelPageSpeed\ServiceProvider"

Register Middlewares

Next, the \AsyrafHussin\LaravelPageSpeed\Middleware\CollapseWhitespace::class and other middleware must be registered in the kernel:

Before

Before of Laravel Page Speed

After

After of Laravel Page Speed

Roadmap : Filters

Name Description Available
inline_css Inlines small external CSS files YES
elide_attributes Removes unnecessary attributes in HTML tags YES
insert_dns_prefetch Injects tags in the HEAD to enable the browser to do DNS prefetching YES
remove_quotes Removes unnecessary quotes in HTML tags YES
trim_urls Removes unnecessary prefixes from URLs YES
collapse_whitespace Removes unnecessary whitespace in HTML YES
remove_comments Removes HTML comments YES
combine_css Combines multiple CSS files into one NO
combine_heads Combines multiple elements into one NO
combine_javascript Combines multiple JavaScript files into one NO
dedup_inlined_images Replaces repeated inlined images with JavaScript that loads the data from the first instance of the image NO
defer_javascript Defers the execution of javascript in the HTML NO
pedantic Adds default type attributes to script and style tags that are missing them NO
extend_cache Improves cacheability NO
fallback_rewrite_css_urls Rewrite URLs in CSS even if CSS is not parseable NO
flatten_css_imports Flattens @import rules in CSS by replacing the rule with the contents of the imported resource NO
hint_preload_subresources Inserts link: headers to preload CSS and JavaScript resources NO
inline_google_font_css Inlines small font-loading CSS from Google Fonts API NO
inline_import_to_link Inlines style tags comprising only CSS @imports by converting them to an equivalent link NO
inline_javascript Inlines small external Javascript files NO
inline_preview_images Delays original images; serves inlined, low-quality placeholder images until originals are loaded NO
insert_ga Inserts Google Analytics javascript snippet NO
lazyload_images Loads images when they become visible in the client viewport NO
local_storage_cache Loads inlined CSS and image resources into HTML5 local storage whence the client fetches them subsequently rather than the server sending them again NO
make_show_ads_async Converts synchronous Google AdSense tags to asynchronous format NO
make_google_analytics_async Converts synchronous Google Analytics code to load asynchronously NO
move_css_above_scripts Moves CSS above scripts NO
move_css_to_head Moves CSS into the element NO
outline_css Moves large inline