Giter Club home page Giter Club logo

client-side-includes's Introduction

client-side-include (SSI alternative for Yeoman)

Easy way to work with server side includes when your development server doesn't support them. Uses a simple javascript library to pull in included files via ajax.

Depends on jQuery (tested with version 1.8.2).

How to use:

  1. Include clientincludes.js on your page page
  2. Call doClientIncludes() first thing in your page initialization, your $(document).ready() handler is a good place for a typical jQuery app
  3. Use a standard server side include statement at your page HTML source eg: and the corresponding file will be included just as in your production server.
  4. The script uses port number 3501 to determine whether or not to include files, you can edit the script to look for any other port number.

This is a script that can be used when working on a project that requires server side includes (SSI) and that will be hosted on an (apache, nginx etc.) type of server.

By Including the script on your project, you can then break your HTML pages to contain common areas like Headers & Footers via SSI and see them while on "dev mode on Yeoman" [ $yeoman server ]. After you finish your work your final production files will simply use the SSI provided by your production server since it will use the same html code required to pull in those includes. This makes this script a good non-invasive choice.

Enjoy :-)

client-side-includes's People

Contributors

dantaylor avatar richmusser avatar

Watchers

 avatar  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.