Code Monkey home page Code Monkey logo

contentdeliveryengine.js's Introduction

Content Delivery Engine

This plugin is being developed under GNU General Public License v3.0. Please click the license link for further information about contribution.

contentDeliveryEngine.js

contentDeliveryEngine.js is a PHP-integrated jQuery plugin that loads page contents dynamically via XHR into a container, saving data traffic. If the pages are optimized correctly for the plugin, pages will load much faster and data usage will reduce.

Documentation

engine.js is the core javascript file that contains Content Delivery Engine. The file is loaded on the main container page only once. It does not and should not contain dynamic javascript code.

func.js is the helper file for the plugin that contains loadAsXHR function (XHR Trigger Module). This file can contain regular or dynamic javascript code.

/index.php is the main container page that all the pages load into. ".js" files files are loaded in here. It also contains regular meta tags.

main.php is the homepage file.

To create another page, only a folder and an index.php inside it are needed. The following code should be added into the child index.php file in order to connect the plugin with PHP.

<?php
	$pageName="foldername";
	if(!empty($_SERVER["HTTP_X_REQUESTED_WITH"]) && strtolower($_SERVER["HTTP_X_REQUESTED_WITH"])=="xmlhttprequest"){
?>
<p>PAGE CONTENT</p>
<?php
	}else{
		header("Location:/#".$pageName);
	}
?>

Demo

Demo view is still under construction.

Installation

  • engine.js and func.js files should be included
  • jQuery should be included
  • PHP integration must be done (see: Documentation)

contentdeliveryengine.js's People

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.