Server Side Includes (SSI) with ASP


Server Side Includes (SSI) with ASP

People often have identical sections of code spread throughout many ASP pages, typically code at the top of the page (usually referred to as the header) and the lower part of the page (the footer). Similarly, you may have code that performs a certain set of instructions that you are repeating across multiple pages. Consider an example:-

<%
If foobar="yes" then
response.write "YES!"
Else
response.write "NOT YES!"
End if
%>

Ok, ok... it's simple, but imagine that you used this on multiple pages. What's wrong with this picture?

Well... you don't have to think about that long before realising that if you ever wanted to change something about that piece of code, you'd have your work cut out. you would have to change every page... everyone has done this at some stage and luckily most usually take the steps to learn a way around this problem.

If we could save our valuable chunk of code into a file and have that file accessed whenever we needed the code, then we no longer have a problem when it comes to changing things, as we simply update one file. Include files or Server Side Includes (SSI) as they are more commonly known are a powerful way to not only save time when it comes to maintaining and updating a site, but also increase efficiency and speed of that site too!

Ok, lets see how we use an include file... to start with we need to use one of two methods. The first one allows for including files relatively. By that I mean relative to the directory the ASP file that is using the include file resides. The second method includes files virtually. Including files virtually means that the path is taken from the root directory.

Consider that we are going to have a file (/main/somefile.asp) include another file (/includes/someinclude.asp).

To demonstrate, relative inclusion, look at this:-

<%
Response.Write "executing included code now"
%>
<!--#include file="../includes/someinclude.asp"-->
<%
Response.write "done executing included code"
%>

And here, we give an example of the other method, virtual inclusion:-

<%
Response.Write "executing included code now"
%>
<!--#include virtual="/includes/someinclude.asp"-->
<%
Response.write "done executing included code"
%>

Note the slight difference between the two methods. With virtual inclusion, you can move the file that calls upon the include file anywhere without affecting the outcome, because the path is always relative to the root. The same cannot be said however for relative inclusion. If you move a file that is using relative inclusion to a different directory, you'll most likely find the relative path is no longer correct.

From the examples above, you may also notice that both methods, when calling the include do so OUTSIDE of the ASP script block. This because #include declarations are not interpreted by ASP. Include files are included before a single line of ASP is processed which means the following WONT work:-

%lt;%
Page=request.form("page")
%>
<!--#include file="../includes/<%=page%>.asp"-->

We were attempting to perform a dynamic include and I would be the first to admit that the above would be very useful indeed if in fact it were possible. I do intend to cover a few methods that work around this set back but I know you will now be itching to get started right away on using include files to even worry about this, so I will cover it in a future article.

I hope that you have found the above informative and hope it inspires you all to write code that's more efficient and more easily maintained.

Rob Collyer, experienced with 20 years programming knowledge and site administrator of www.webforumz.com - Copyright 2003-2004

In The News:

Web Development on an iPad  Laravel NewsThe idea of working entirely from an iPad has always appealed to me. The portability, the battery life, and of course the touch screen makes it an excellent device ...
Leveraging Data Science In Web Development  CIO ApplicationsWeb developers are now using AI to make sense of all the data points and incorporate the results into apps from the design stage.
Web Development: What's Big In 2019?  HackadayI try to keep up with web development trends but it's hard to keep pace since it's such a fast evolving field. Barely a week goes by without the release of a new JS ...
What Skills Should You Look for in a Web Developer?  Customer ThinkIntroduction. Choosing a web development company is one of the most important decisions a business can make in today's marketplace. Simply put, how a ...
Web development school pushes for more tech-industry training  KMTV - 3 News NowThe Interface Web School, which is a part of the AIM Institute, wants to help put people to work in the growing tech industry.
Trends You can Expect in Web Development for 2019  Customer ThinkThe current generation of website developers is ideal employees in consideration of web development spectrum. Most of the modern people respond quickly to ...
From Salon Marketplace: Earn a web development certification with this bootcamp  SalonThe Beginner Full Stack Web Development course provides a strong foundation of digital knowledge.
How to become full-stack web developer  JAXenterIf you're looking for a way to become a full-stack web developer, and amplify your chances of landing a well-paid job, here is the ultimate guideline.
This $41 course package can get you hired as a back-end web developer  The Next WebFront end developers get all the glory. Their work is always right there in a user's face with all that HTML and CSS goodness. But those in the know know that the ...
10 Essential Question to Ask Your Web Developer  Business.comAsking the right questions when choosing a web developer can help you find someone who understands your vision and can give you the website you want.
Best Programming Languages For Backend Web Development  TechnotificationHere are some interesting server-side web development programming languages worth considering for web development.
Score 9 courses on back-end web development for just $41  MashableAt the risk of sounding totally high: Websites are sort of like restaurants, when you think about it. Stick with us. You've got your front-end developers, who function ...
Intermediate Web Developer  IT-OnlineJan 16, 2019. Role Purpose:The Intermediate Software Developer is responsible for creating and maintaining software for both the clients and SaaS products.
Best Web Frameworks in Popular Programming Languages  TechnotificationWeb frameworks simplify the whole web development process. The big question is: Which are the best web development frameworks to use in 2019?
Angular 6 training: Start your career in web development  Augusta Free PressAngular 6 is a Java-based web application development framework that had made waves in the industry.
Top Five Programming Languages To Learn In 2019  Analytics India MagazineIn this article, we list 5 programming languages that are recommended for 2019 and the importance of these languages. These langyages are in great demand.
Why an Understanding of UI and UX is Now Vital to Web Development Success! - WhaTech  WhaTechWhen developing a web site, the way the user will ultimately interact with that site has become very important to the ultimate success of the project.
What is the best website design and website development companies in India? - Business Advice  Business.comThe ubiquity of web development companies in India doesn't really translate to the ease of finding them. You may ask your peers around and they will tell you ...
Guidelines for iPhone Web-Development – OSnews  OS NewsApple posted on their developer website guidelines with instructions on optimising web-applications for the iPhone. “Developers can create Web 2.0 ...
Well-Known Name in the field of Web and Mobile App Development From London!  The FriskyAs we're living in the age of the smartphones, the users of these devices are taking advantage of various amenities and services available to them. Mobile ...
Web Developer job, Johannesbug, Fourways  Bizcommunity.comDigital Briefcase is a digital marketing agency looking for a mid-level web developer to join our team from February 2019.Design, maintain and implement new ...
How to make a career change into the tech industry before leaving college  BorderzineCollege is the time to figure out what you're good at and who you are as an individual, at least in my experience. I changed my major twice in four years and ...
Using Ruby on Rails for Web Development on Mac OS X – OSnews  OS News“It should come as no surprise that Mac OS X is a favored platform for Rails development. Rails and its supporting cast of web servers and databases thrive on ...
Apache Web Development with IBM DB2 for Linux – OSnews  OS NewsIBM's strategy for Linux is starting to pay off as “Linux Breathes New Life Into The Mainframe”. The focus is not only sales but also in education as IBM released ...
Top technical skills that will get you hired in 2019  Computerworld Hong KongHere are the fastest-growing skills in tech job searches that could land you a role in tech in 2019.
5 Ways Startups Can Strengthen Their Online Reputation  ADOTASNowadays, with the advancement of technology, prospective customers and clients are able to see what companies have to offer with only the click of the mouse ...
Web developer Ixis acquires ecommerce specialist LiberoNet  Liverpool Business NewsWarrington-based Ixis, which has reported a significant rise in turnover and profits, will see its headcount rise to 20 following the deal. Ixis Dan Pala of LIberoNet ...
A Month With the Surface Laptop 2 and Surface Pro 6  Thurrott.comMicrosoft's Surface Laptop 2 and Surface Pro 6 are two of the fundamental pillars of the Surface brand. Surface Pro represents Microsoft's Surface line better ...
Kunsh Technologies - web design and development company, India Awarded "Site of the Day" in Design...  WhaTechMany web design nominees and award winners will agree upon the notion that, we have earned a moment that you might call a virtual red carpet.
Creating native mobile apps without writing native code  App Developer MagazineThe evolution of mobile development frameworks and how NativeScript is carving out a new landscape of its own among developers already familiar with ...
5 Ways in Which Data Science Is Revolutionizing Web Development  Analytics InsightCustom software development companies are figuring out new ways to utilize the advanced data science techniques to build customized websites to suit specific ...
From being a rookie to grabbing an internship: Sanya's tryst with web development  QriusSanya Singh is a student of Northern India Engineering College, who learnt the ropes of web development through Internshala and bagged an internship.
9 Web development trends you simply cannot ignore in 2018  TechGenYZWeb development is a major part in conversions and increasing your sales.To optimize your websites know the web development trends of the year.
Learn Web Development for Free With App Academy  LifehackerCoding school App Academy has opened a free online interactive version of its 12-week curriculum. That's a pretty good deal, since the Academy's in-person ...
How Is Data Science Transforming Web Development?  DataconomyWeb app development is about to undergo a significant revolution triggered by the rise of data science. So far, developers have created apps based on focus ...
Know about the current trends in web development  Customer ThinkIn case of web development, you may have probably heard that the only constant is the change. It is an industry-defining statement as web development keeps ...
Careers in Web Development  Telangana TodayIn the last edition we have discussed about various technology stacks, what to learn and what is the career path. This article details about careers in web ...
Done Role of IoT in Web Development  Customer ThinkWith the increasing advent of technology and the ever-changing demands of people as well as businesses, there has been a rise in technologies which have ...
How will AI change the web development in future?  Customer ThinkAI is present everywhere – from chatbots to virtual assistants, AI is used in day to day activities. Virtual assistants like Siri and Cortana are helping the users by ...
How IoT Is Changing Web Development  IoT For AllIoT brings changes to software development on many levels, including on the web. Let's discuss the main peculiarities and nuances of IoT web development.
Focusing on data science and web development, edtech startup edWisor looks to bridge the skill gap  YourStory.comBootstrapped edWisor looks to address skill shortage in the areas of data science and web development, and uses gamification to align freshers with industry ...
4 Ways Web Development Has Changed Over the Years  The Hans IndiaWeb development has seen many changes over the years New ideas, new technologies and what is acceptable as an industry standard has pushed web ...
JavaScript and Web Development InfoQ Trends Report  InfoQ.comThis InfoQ Trends Report looks at the current trends with JavaScript, HTML, CSS, and web development in general, exploring technologies and options gaining ...
Five hacks to land a top-notch internship in web development  Daily News & AnalysisWhether you've got your degree in web development or you're still studying, it is imperative to gain some practical experience in the field. But, landing a web ...
Things You Should Definitely Know About Web Development Team  Customer ThinkImagine one time you came up with a great idea to create a website for your company. The first step to take in this case is to hire a web development team of ...
3 Reasons to utilize background checks  TechGenYZSo you think that your business needs a web presence. For an unmatched website, you would love to hire the best web development company. However, just ...
Spring MVC tutorial: How Spring Boot web MVC makes Java app development easy  TheServerSide.comThere are many Java web development tutorials available online, but there are very few Spring MVC examples that run within a Spring Boot project. This Spring ...
Microsoft brings Chromium to Edge to reduce web development fragmentation  SDTimes.comMicrosoft has announced plans to adopt Chromium into Microsoft Edge on desktop. Chromium is an open-source web browser project created by Google.
4 Questions to Ask a Web Developer During an Interview  DevOps.comWeb development is a fragile process. You need talented web developers to make truly beautiful sites with seamless user experiences and fast loading There's ...
Lean Web Development with the Best Teachers Online  Digital InspirationFor the past few months, I have been on a learning spree looking to enhance my existing coding skills and also learn new programming languages and ...
Report: What is the next big thing in web development?  JAXenterThe 2018 Packt Skill Up Report: We take a closer look at web development: What technologies are currently number one and what does the future hold?
How do I know if Web Development is right for me?  TechRepublicHow do you know if you're ready for a career change in tech, and if that change is right for you? A TechRepublic member is trying figure this out and is asking ...
6 steps to becoming a full stack developer  TechGenixThe journey to becoming a full stack developer might appear herculean at first. But once you master these six steps, you are on your way to getting there.
Why Hiring Top Web Developers is a Good Idea  DevOps.comWeb development is one of the most valuable activities of any company, especially tech companies and web design agencies.
Learn Web Development For Just $15 With This Amazing Complete Web Developer Course 2.0 – Limited Offer  WccftechLearn web development with Robert Percival. Get the Complete Web Developer Course 2.0 for an amazing discount offer and start a career!
Top 6 Web Development Trends that will Dominate 2019  ToolboxWhen it comes to web development you are bound to experience constant changes and updates in the designs every year. In fact, the updates and trends are ...
The elements of WebAssembly – Wat and Wasm, explained [Tutorial]  Packt HubIn this tutorial, we will learn about the WebAssembly modules Wat and Wasm, their values, types, and module sections.
Tips to Hire a Web Developer with Required Skills in 2019  Customer ThinkWeb development is serious business. In recent years, it has had a great impetus and is one of the major priorities for every business irrespective of its size and ...
8 Tips To Start Building User-friendly eCommerce Website Development  Customer ThinkeCommerce, a big-time word which we hear every day. Whether, big or a small enterprise, eCommerce website development is an unsaid must for your ...
Ten Basic Things Every Web Developer Should Know  HTML Goodiesten things you need to know if you plan to build a web site.
Learn the tricks of web development in 44 hours  Android AuthoritySpending just $29 could be the start of your future in web development. The minimum outcome is that you learn an interesting and marketable new skill. If things ...
Yale announces Web Development “Bootcamp”  Yale Daily NewsYalies interested in programming will be able to take a 10-week web development boot camp this summer for credit, offered as a part of Yale Summer Session, ...
Django vs Flask: A Look At The Two Popular Python Web Frameworks  Analytics India MagazineIn this article, we look at two of the best frameworks, Django and Flask that can be used by Python programmers and developers.
Job vacancy: Marketing and web development project manager  International Association of Athletics FederationsThe IAAF is seeking a marketing and web development project manager at its Monaco headquarters. Reporting to the chief information officer, the marketing and ...
YouTube for Android gets a new UI and voice command for a better-customized interface  TechGenYZNeed to learn web design and development? No worries, there are millions of tutorials, and videos available on YouTube for people to learn new skills or to ...
Image Management 101: The Web Developer’s Guide  DevOps.comHow understanding the user experience can help web developers in managing images effectively Online experiences have in many ways supplanted in-person ...
What is Document Object Model (DOM) in Web Development?  TechnotificationBrowsers know how to convert the tags of the HTML into a tree with the help of DOM. Here is all you need to know about Document Object Model.
Why has Python Failed To Penetrate The Enterprise Development Sector?  Analytics India MagazinePython has built considerable buzz in the large-scale web development space, but despite its popularity, it has failed to penetrate enterprise development.
4 Ways to Ensure Effective Web Development  Business 2 CommunityWhen it comes to building a new website, many businesses choose to focus predominantly on the design aspect of the project when approaching agencies to ...
This web developer course is down by over £150  MashableProgress from a junior to senior web developer for just £11.99 with this course.
Understand Web Development in Less than 1 Hour  SitePointThis article explains what web development is, by exploring how it started and how it evolved.
Yale, Flatiron School create web development bootcamp for summer session  Yale NewsYale Summer Session is collaborating with Flatiron School to offer a Web Development Bootcamp for Summer 2019, which will carry two Yale College credits, ...
How Website Development Has Changed Over the Years (infographic)  Digital Information WorldWebsite design has come a long way in a relatively short time. From zeros and ones to lines of code to intuitive website builders, designing for the web has ...
Top 5 Web Development Startups of 2018  BBN TimesTech Start-ups are the most trending things among investors and entrepreneurs due to the serious innovations they offer. Who knows which upcoming tech ...
“ChromeOS is ready for web development” – A talk by Dan Dascalescu at the Chrome Web Summit 2018  Packt HubAt the Chrome Web Summit 2018, Dan Dascalescu, partner developer advocate at Google provided a high-level overview of ChromeOS and discussed ...
Which Cloud Solution Is Best For Your Web App Development  MobileAppDailyLearn more about which cloud solution is most suitable for your web app development and what is the right way to choose an efficient cloud *service* .
Full stack puts Bellevue University web development students ahead of the pack  Omaha World-HeraldStudents learn to design, code, implement and maintain an interactive website on their own.
Best web development tools of 2018  TechRadarGrab the right tools to get web development done without breaking a sweat.
Some of the Best IDEs and Text Editors for Web Development  TechnotificationThe right IDEs or a Text editor will be a huge help during coding. It'll help you be faster, accurate and productive for web development.
Use Rust for web development [Tutorial]  Packt HubRust is efficient and has well thought web-oriented frameworks, making it viable for web development. In this article, we'll see how Rust can be used for web ...
Is Agile Web Development All It's Cracked Up to Be?  EContentWhile AWD offers several advantages over waterfall and other methodologies, it has its limitations too. Whether you're preparing to take your first iterative plunge ...
How online learning platforms are bridging demand-supply gap in IT manpower requirement  YourStoryThere is a skill shortage in the IT industry, the global shortage to grow from 7 million to 23 million by 2022, 1.2 million in India set to increase to 6.5.
5 examples of Artificial Intelligence in Web apps  Packt HubThis article highlights the five key areas where web apps are employing Artificial intelligence to automate some part of their system.
Learn the Essentials of Web Development with This eBook Bundle  Interesting EngineeringThrough hands-on, real-world instruction, this course teaches you about everything from development essentials like JavaScript, Java, and C++ to interview ...
How to learn web development online  Tech AdvisorWeb development is one of the 21st Century's most sought-after skills, but with so much to learn it can be quite daunting. After all, coding is quite literally like ...
5 Best Online Front-end Web Development Playgrounds  Technotification5 best online front-end web dev playgrounds to test code. As soon as the code is written, the test-ready output is delivered within seconds.
Break into the field of web development with these discounted e-books  MashableThe barriers to breaking into the web development field are lower than ever. You no longer need to break the bank, quit your job, and enroll in a university to ...
Open Source Dart 2 Revamp Focuses on Mobile, Web Development  ADT MagazineAfter a nearly eight-month pre-release preview, the open source Dart 2 programming language has emerged as a stable release that includes many breaking ...
Cloudflare IPFS Gateway boosts decentralized website development  ZDNetThe new solution enables developers to create websites which are based on peer-to-peer, distributed technologies.
Why choose Angular for Web Development - WhaTech  WhaTechAngular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is developed in JavaScript and uses ...
Straight From the Tech Experts: What Will the Defining Feature of Web 3.0 Be?  TechopediaThe jump from Web 1.0 to 2.0 gave us a more easily accessible, interactive web. So what can we look forward to with Web 3.0? Experts share their thoughts.
Web developers vs. data scientists: Who rules the Python world?  JAXenterWhere does Python's expansion come from? Who's using it more: web developers or data scientists? Python Developers Survey 2017 results are in!
Sign up for a web developer bootcamp class online during this course sale and pay just £12  MashableWeb development sounds like something that should be kept to the confines of tech support HQ — clouded in mystery and something us mere mortals cannot ...
Uber introduces Fusion.js, a plugin-based web development framework for high performance apps  Packt HubUber introduces Fusion.js, a brand new web framework based on a plugin-based architecture with module reloading, and bundle splitting support.
Best Web Certifications  Business News DailyCertifications from Adobe, Google, Microsoft and Zend will all give you the skills you need to be a competent web designer, developer and SEO specialist.
Netlify just got $30 million to change the way developers build websites  TechCrunchNetlify wants to revolutionize the way developers build websites, abstracting away the web server and breaking web sites into microservices, making the process ...
Why everyone should know programming  Business TodayMost people tend to assume that everybody with an interest in programming wishes to become a computer scientist. It is precisely this thought that Dr Chuck is ...
Web development tools, frameworks evolve quickly  SDTimes.comChanges in technology have led to changes in how web applications are created. And that has caused some consternation among web developers. A decade ...
Seven Reasons Why A Website's Front-End And Back-End Should Be Kept Separate  ForbesHere is why it may be a good idea to have a separate back-end and front-end for a website.
A web developer's perspective: Edge's move to Chromium will increase productivity, but raises long-term concerns OnMSFT.com  OnMSFTLast week Microsoft confirmed the unprecedented news that it's rebuilding its Edge web browser atop the Chromium open-source rendering engine. It spells the ...

Art, Artists and the Web: Part 3--What to Put on an Artist?s Website

What to put your the website if you are an... Read More

Why do I Need a Website?

Cost Effective Advertising. Online selling. Increased geopgraphic range. Wider... Read More

UK Online Shopping with an Edge, for Buyers and Sellers Alike

Any new website competing on the internet, needs to take... Read More

Website Conversion Rate: More Keywords Equals More Sales

Your website conversion rate should concern you. This simply refers... Read More

A Website Is Not Enough

Your ObjectiveYour small business needs an appealing and professional website... Read More

So You Want To Have A Website

So you want to have a website. You have gone... Read More

Setting Up A CGI Script On Your Web Site

Before you set up any scripts you will need some... Read More

The Most Important Aspect of Writing Web Copy

There is an ongoing debate about web copy. Some say... Read More

Flash Deadly Sins (That Can Kill Your Web Business)

Looks like every client wants a Flash site these days... Read More

The Secret Benefit Of Accessibility: Part 1 - Increased Usability

Web accessibility has so many benefits that I really do... Read More

Up The Sandbox!

Go to any internet marketing forum you want these days... Read More

How to Get a Knock Out Website!

The first step in setting up an online business...Starting an... Read More

Build a Strong Foundation for Creating Your First Online Identity ? Notes for Beginners

If you are looking for creating your online presence you... Read More

5 Ways to Build a Website

If you are like me you have wanted to build... Read More

How to Create Sizzling Sales online

"Don't Sell the Steak, Sell the Sizzle."Have you heard of... Read More

Revealing the Firefox Secret Used by Top Web Developers and Power-Browsers

Profiles are one of the best kept secrets around regarding... Read More

Make Your Web Site Stand Out

When visitors add your web site to their Favorites or... Read More

50 Ways To Use Your Website

A website is the most versatile and cost-effective marketing tool... Read More

Get Your Business on the Web

I can't think of any business alive today that couldn't... Read More

How To Convert More Sales On Your Website

One of the biggest mistakes that most online retailers make... Read More

9 Simple Steps to Create a Background Tiled Image Branded with Your Name

You have seen those web pages where they have the... Read More

Your Website Should Be Selling

It may come as some surprise to a traditionally off-line... Read More

Effectively Using Robots Meta Tags

The "robots" meta tag, when used properly, will tell the... Read More

Art, Artists, and the Web:Part: 2--First Steps in Building an Artist?s Website

What you should do and know if you are an... Read More

Adding Word Rich Content to Your Website

You have permission to publish this article electronically, in print,... Read More