Home > Articles > Webmaster resources > Javascript includes

JSINC: Javascript include file creator

Code by Joseph K Myers. This interface by Sean McManus.

As my Javascript content syndication tutorial explains in more detail, you can use Javascript includes to syndicate your HTML content to other websites. All you need to do is write some Javascript code that outputs your HTML to the screen and save it in a .js file. The beauty of it is that sites from all over the web can embed your JS file in their websites so they can display your HTML.

If you want to syndicate your content (give your content away to other sites for promotional reasons), this is ideal, because you can update the .js file on your server and all your partner sites will immediately start displaying your updated HTML.

This page will create Javascript include files (.js files) for free. While there are plenty of commercial Javascript syndication programs available, this software is free.

Step 1: The HTML input

Paste any HTML you wish to be converted into this box.

Step 2: Name your script file

File name for the .js file which your syndication partners will link to (you can leave the default name):

Step 3: Generate code

Step 4: Create your script file

Copy the text in the box below and paste it into a new file. This is your Javascript code. Save the file as text-only and give it the name you entered in step 2 (above).

Step 5: Include code

This belongs in each of your web pages where you want to insert the contents of the HTML file. If the .js file isn't in the same folder or on the same server as the file referencing it, you'll need to add the full path before the filename. So your link partners, for example, will need to include your domain name before the filename to embed your Javascript in their pages.


© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

Coding Compendium

Coding Compendium

A free 100-page ebook collecting my projects and tutorials for Raspberry Pi, micro:bit, Scratch and Python. Simply join my newsletter to download it.

Web Design in Easy Steps

Web Design IES

Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Newsletter | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About