承接 evheniy/html5-cache-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

evheniy/html5-cache-bundle

最新稳定版本:1.5.0

Composer 安装命令:

composer require evheniy/html5-cache-bundle

包简介

The HTML5CacheBundle adds the ability to add HTML5 Application Cache to your application.

README 文档

README

This bundle provides HTML5 Application Cache for Symfony2

knpbundles.com

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Coverage Status Scrutinizer Code Quality Build Status

Installation

$ composer require evheniy/html5-cache-bundle "1.*"

Or add to composer.json

"evheniy/html5-cache-bundle": "1.*"

AppKernel:

public function registerBundles()
    {
        $bundles = array(
            ...
            new Evheniy\HTML5CacheBundle\HTML5CacheBundle(),
        );
        ...

config.yml:

#HTML5CacheBundle
html5_cache: ~

or

#HTML5CacheBundle
html5_cache:
    cdn: cdn.site.com
    http: true
    https: false
    custom_urls:
        - https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
        - https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
        - https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css
        - https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js
        - ...

layout.html.twig:

<html{{- cache_manifest()|raw -}}>
...

The last step

app/console manifest:dump

Documentation

You can use local CDN (domain):

html5_cache:
    cdn: cdn.site.com

Default value is empty

You can set protocols for local CDN:

html5_cache:
    cdn: cdn.site.com
    http:  true
    https: false

Default value: true (for both)

You can set custom urls:

html5_cache:
    custom_urls:
        - https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js
        - https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
        - https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css
        - https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js
        - ...

Default value is empty

Partial using

layout.html.twig:

<html{%- block cache_manifest -%}{%- endblock -%}>
...

page_with_cache.html.twig:

{%- extends "layout.html.twig" -%}
{%- block cache_manifest -%}{{- cache_manifest()|raw -}}{%- endblock -%}
...

page_without_cache.html.twig:

{%- extends "layout.html.twig" -%}
{%- block cache_manifest -%}{%- endblock -%}
...

JqueryBundle

If You are using JqueryBundle, this url:

https://ajax.googleapis.com/ajax/libs/jquery/{JqueryBundle.config.version}/jquery.min.js 

will be inserted automatically

TwitterBootstrapBundle

If You are using TwitterBootstrapBundle, those urls:

- https://maxcdn.bootstrapcdn.com/bootstrap/{TwitterBootstrapBundle.config.version}/css/bootstrap.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/{TwitterBootstrapBundle.config.version}/css/bootstrap-theme.min.css
- https://maxcdn.bootstrapcdn.com/bootstrap/{TwitterBootstrapBundle.config.version}/js/bootstrap.min.js

will be inserted automatically

MaterializeBundle

If You are using MaterializeBundle, those urls:

- https://cdnjs.cloudflare.com/ajax/libs/materialize/{MaterializeBundle.config.version}/css/materialize.min.css
- https://cdnjs.cloudflare.com/ajax/libs/materialize/{MaterializeBundle.config.version}/js/materialize.min.js

will be inserted automatically

License

This bundle is under the MIT license.

Документация на русском языке

Demo - Open page, then turn off network and update page

HTML5 Application Cache

统计信息

  • 总下载量: 2.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固