Web News

Canada's first Masters in IT security graduate
The University of Ontario Institute of Technology releases pupils from a program developed two years ago to enhance existing skills in malware and data protection. The inaugural alumni talk about their future plans...

bioLytical Partners With Virgin Mobile Canada
bioLytical Laboratories is proud to announce that Virgin Mobile Canada will be sponsoring the Test Your Commitment campaign this August. Test Your Commitment is a tri-city mobile campaign that will offer thousands of free HIV tests to Canadians in an effort to raise awareness and encourage HIV testing...

Ingram Micro Canada and Lenovo Canada partner
Lenovo has announced (July 14th, 2007) new accelerator pricing on selected T Series and L3K notebooks. This reduced pricing runs from July 15th through until September 30th. Discounts in this promotion range from $100 to an amazing $450 savings. Call your Ingram Rep today!



Recent Articles

AJAX UI Menus in Coldfusion 8
Continuing on with my tour of the new AJAX UI controls in ColdFusion 8, today I want to talk about menus.

Automatically Pushing to a new URL Made Simpler
When I was preparing to move my site from http://ray.camdenfamily.com to http://www.coldfusionjedi.com, I certainly didn't want all of my old URLs to stop working.

ColdFusion 8: Admin API & Trusted Cache
Along with cool tags and functions added in ColdFusion 8, there have also been some neat updates to the Admin API. If you don't know what the Admin API is - it is a set of CFCs that give you programmatic access to various administrator type functions.

Autosuggest in Spry
Autosuggest isn't new to Spry 1.5, but I never had a chance to take a look at it till this morning.

cfObjective - Mark Mandel & Transfer ORM
The problem that we need to solve is writing all the objects that model your database. This is a long and painful process. The basic creation by itself is bad - but it gets worse when you make updates to your database.

ASP.NET: Count Clicks on External Links
On a small test website I'm building in my spare time, I wanted a way to count the number of clicks to the outgoing links from that site.

Nice PHP Contact Form Script & a Few Alterations
A colleague from the Women Designer's Group has a great little PHP contact form script posted on her blog.

Coldfusion: Switching to CFQUERYPARAM
I've had a few requests to quickly review how to switch a dynamic query not using cfqueryparam to one that is using cfqueryparam. I've covered the reasons for using them many times (basically sql injection and performance). There are also things you lose (like ColdFusion's built in query caching).


07.16.07


Saving Bandwidth On Your RSS Feed

By Pete Freitag

One of the things you will notice after you have published an rss feed is that it will consume a lot of the bandwidth.

For example on Spendfish.com 18% of the requests are for RSS feeds. This is no wonder since feed readers may download your feed several times a day even if nothing has changed.

I've put together a list of ways you can save bandwidth and reduce the number of requests to your RSS feed (which also saves server processing).

1 - Use the ttl Tag

The ttl tag goes directly inside the channel tag in your RSS feed. It stands for time to live, and should hold the number of minutes a RSS reader should wait before requesting your feed again. Most blog software defaults this setting to 60, which means that your feed will be downloaded every hour by clients that obey this setting. We can increase this to 3 hours by adding the following:



Read more about ttl here

2 - Add a skipDays tag

The skipDays tag also goes inside the channel tag and should contain several child day tags. As you might guess this tells RSS readers to skip downloading your feed on the specified days. For example if you don't publish content on the weekends:



3 - Add a skipHours tag

Same idea as the skipDays tag, but allows you to specify which hours during the day your feed should not be downloaded. The hours are specified in 0-23 using GMT. For example since I'm in NY, and I typically don't post things to my blog very early in the morning I could add:



More info about skipHours and skipDays here.

4 - Support If-Modified-Since header

Many RSS readers and clients send an If-Modified-Since header in their request to your RSS feed. This is one of the ways clients make what's called a conditional HTTP GET, you can return a 304 Not Modified HTTP response code (and omit the request body) if the RSS feed has not changed since the date specified in the If-Modified-Since header. If the content has changed you simply return the normal 200 status code.

The header sent by the client might look something like this:

If-Modified-Since: Tue, 10 Jul 2007 21:19:55 GMT

Most clients will pass in the value you specify in the Last-Modified header, so you should make sure that header is being populated. More info here. ColdFusion If-Modified-Since example here.

5 - Support ETag and If-None-Match HTTP headers

The ETag header is a HTTP response header that you can send back in your RSS feed response. It stands for entity tag and should be a unique value representing the content, you could do a MD5 hash of your RSS feed content, or simply use a date time of the last change. Clients will send this back in a If-None-Match header, if this header contains your current ETag then you can return a 304 status code. More info about If-None-Match here.

6 - Don't send the request body on HTTP HEAD requests

Here's what HTTP 1.1 has to say about the HEAD method:
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
The HEAD method should only return HTTP headers, and no request body (so you don't need to return your entire RSS for these types of requests). You will find that several aggregators and readers will make HEAD requests for your feed (including MXNA), it's a simple way to save some bandwidth.

Read the rest of the article.

Comments

*Originally published at Pete Freitag's Homepage.

About the Author:
Pete Freitag (http://www.petefreitag.com/) is a software engineer, and web developer located in central new york. Pete specializes in the HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete published the ColdFusion MX Developers Cookbook with SAMs Publishing.

Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes in Web Consulting, and Products for Web Developers.

About DevWebProCanada
DevWebProCanada is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProCanada delivers via news and expert advice New Strategies In Development.

DevWebProCanada is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagementNews.com


-- DevWebProCA is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal 


archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


Delivering IT Solutions DevWebProCanada News Archives About Us Feedback DevWebProCanada Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact