Posts Tagged ‘requests’

General introduction-Java script

Wednesday, July 16th, 2008

JavaScript is most commonly used as a client side scripting language. This means that JavaScript code is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it’s up to the browser to do something with it.

The fact that the script is in the HTML page means that your scripts can be seen and copied by whoever views your page. Nonetheless, to my mind this openness is a great advantage, because the flip side is that you can view, study and use any JavaScript you encounter on the WWW.

JavaScript can be used in other contexts than a Web browser. Netscape created server-side JavaScript as a CGI-language that can do roughly the same as Perl or ASP. There is no reason why JavaScript couldn’t be used to write real, complex programs. However, this site exclusively deals with the use of JavaScript in web browsers.

If you don’t have any programming experience at all it’s best to start with some gentle JavaScript examples that teach you the basics. It might be a good idea to buy Negrino & Smith, “JavaScript for the World Wide Web”, 4th edition, Peachpit Press, 2001. It contains some very useful examples and though it doesn’t treat advanced programming tricks, it will certainly help you get started. Of course this site also offers plenty of help.

I can also recommend Jeremy Keith, DOM Scripting: Web Design with JavaScript and the Document Object Model, 1st edition, Friends of Ed, 2005. This, too, is a book that doesn’t delve too deeply into technology, but gives non-programmers such as graphic designers/CSS wizards an excellent overview of the most common uses of JavaScript - as well as the most common problems.

Search engine optimization-Swap Links

Tuesday, July 15th, 2008

Similarly many bloggers swap links with other bloggers. Sometimes this happens pretty naturally (you see someone linking to you so you link back) but in many cases the links are strategic ones and formally arranged between site owners. I get daily requests for such reciprocal links (I rarely act on them). Whilst there is some benefit in such link swapping I would again advise caution here as many SEO experts believe that the search engines have methods for tracking such strategies and devaluing the links. Some try to get around this by doing indirect or triangulated links. ie instead of site A and B doign a direct swap they involve other sites. So A links to C in exchange for D (also owned by C) linking to B (also owned by A) - makes your head hurt doesn’t it!?! There are also a variety of systems around that say they’ll take care of such interlinking for you - I know many who use Digital Point’s Free C0-Op Advertising system. Personally I tend to avoid such schemes and have a policy of linking to sites I think are valuable to my readers. If they link back then so be it.

Bandwidth

Thursday, June 26th, 2008

Bandwidth is a term that has several different meanings depending on the context. When talking about bandwidth in terms of Web Hosting it refers to the amount of data that transfers into and out of your web hosting account. Incoming data can include requests for web pages, email, FTP requests, and FTP uploads, while outgoing data includes file transfers, web pages, and email. Each hosting account is allocated a certain amount of bandwidth per month. Common figures for bandwidth range from 3 GB for small personal sites up to 200 GB for large business systems.

How much bandwidth do you need? This depends on the amount of traffic your website receives as well as the content. Web pages made up of text and a few pictures are very small in size but if you get thousands of visitors each day you may need a lot of bandwidth. On the other hand website content consisting of downloadable files such as software, music or video is much larger in size, so even if your traffic is fairly low you may need extra bandwidth.

The best way to calculate the amount of bandwidth you need is to calculate the size of your downloadable content and multiply by the number of visitors you receive each month. Add to that the number of emails sent and received and other content such as FTP uploads. The figure you come up with should be pretty accurate because it is unlikely that every visitor to your site is going to download every file or view every page. This will give you a bit of margin to play with.

As your web site grows and as you receive more traffic you may have to increase your bandwidth allotment accordingly. It is better to plan ahead and arrange with your web host for a larger hosting package rather than wait until you go over your limit. Check with your host to see what their policy is in regards to exceeding your bandwidth. Some will allow you to go over by a certain amount while others will shut down your site and demand that you upgrade your account before resuming service. It is always best to keep track of how much bandwidth you are using and anticipate when you need to upgrade.

If you feel that you have sufficient bandwidth and would prefer not to upgrade you may be able to ‘throttle’ traffic if you are approaching your monthly limit. Some hosts offer this service as a way to limit incoming requests or to exclude requests once a certain number has been reached.

There are several throttling options. You can limit the number of incoming requests by specifying an idle time between requests. This causes incoming requests to be delayed by a specified amount of time if too many are arriving at once. Other options are to impose a limit on data transfer within a certain time period or to limit the number of requests for a certain file. The speed of transfers can also be capped at a certain level. Throttling may not be a good idea if you depend on web traffic for your business. If your pages are slow to load or if users can’t access files they are looking for they may give up and move on to another site. If you have a lot of free content, though, throttling can be useful for keeping your hosting budget within a certain amount.