Code Monkey home page Code Monkey logo

upeshv / wp-cache-bundling Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

Cache Bundling helps us to perform several levels of optimization, which includes reducing file size, reduce in the number of network calls, deferring of js, etc. Also integrated JS Sourcemap for better JS sentry error alerting. Added backend option for enabling/disabling caching based on page URL.

PHP 100.00%
phpcomposer php wordpress slack-api sourcemap caching minify-css minify-javascript

wp-cache-bundling's Introduction

Cache Bundling of CSS, JS along with Sourcemap:

Cache Bundling helps us to perform several levels of optimization, which includes reducing file size, reduce in the number of network calls, deferring of js, etc.

In this, I have also focused on adding Sourcemap which will help to identify errors on sentry easily.

As a part of page speed optimization, have used two CSS file one which will contain the first fold of the page and other will have all the CSS which is required for the page. Just to make sure our end-user experience is good.

Below is the list of features that are used to optimzied page load and proper error listing on sentry.

  • First Fold CSS
  • Deferring JS
  • Backend Option for cache bundling
  • Delete caching directory
  • Working Logic around cache bundling of CSS and JS along with sourcemap


First Fold CSS

  add_onload_attribute_link_tag()

Deferring JS

  add_defer_attribute_script_tag()

Backend Option for cache bundling

  register_sub_menu()
  submenu_page_callback()

Delete caching directory

  deleteDir()

Working Logic around cache bundling of CSS and JS along with sourcemap

  cache_bundling_functionality()

Above all this functionality I have also added an option to exclude cache bundling based on pages, you just need to add the page URL excluding domain name example: /homepage separated by a comma for multiple page URL.



Note:

For alerting around my cache bundling I have preferred Slack Notifcation.

And for JS Soucemap integration related alerts I preferred sentry



**Happy Coding :)**

wp-cache-bundling's People

Stargazers

 avatar

Watchers

 avatar

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.