CSS font stacks & developer FAQs with Web standards

WestNIC provides reliable web hosting services

Fastwebhost offers cheap web hosting & reseller hosting services

Site navigation below

This FAQ is part of the Code Style Help and FAQ section. Join our premium content service for full access all FAQ answers.

What if you were One Percent Better? Ebooks for Web developers on iPad, Kindle, Nook and Sony Reader

Web site management questions

Q: How can I publish an HTML document on the Web?

A: If you are used to working with HTML documents on your hard disk, the way you organise HTML on a public Web host is not much different. You will need to find a Web hosting service that provides the level of guidance and support you require. Many Internet Service Providers (ISP) offer free Web space for customers and this is a good place to start.

Ask your service provider for details of how you access your Web space. They will usually provide a user name, password and the name of a host computer for you to connect to and upload your Web pages. The host computer is permanently connected to the Internet, has a hard disk to store your Web pages and a Web server program running on it. The Web server handles requests for your Web pages and sends back a copy of the HTML.

To log in to your Web space and upload your HTML, you will also need a File Transfer Protocol (FTP) program. Some HTML editors have FTP programs built into them, but there are many stand-alone programs available on the Internet too. FTP programs usually have a configuration panel for you to enter your user name, password and host name and will connect and log in to your Web space at the click of a button. Graphical FTP programs typically display the folders and files on the Web host alongside those on your hard disk and allow you to drag and drop files from one to the other.

Transferring files to your Web space should only take a few seconds. Once complete, the HTML should be accessible using your Web browser.

There are a many further details to learn after you have got used to these basic file transfer procedures. One important thing to remember when you are testing your Web pages is that you must always upload changes to your local copy to see the differences.

Q: What is meant by DNS name server?

A: DNS is otherwise known as a Domain Name Service, which is provided by a Domain Name Server. These name servers are part of the Internet infrastructure and share information amongst each other about where to locate servers by domain name. They take a domain name and find the Internet Protocol (IP) address for the host where it is registered, so that client requests can be routed to it.

… full answer hidden, click for full answers

Premium members click below for full answer
What is meant by DNS name server?

Q: How do I correct "/home/~user/htdocs/Login.html" not found?

A: This error means that the Web server expects to find your login page at this file path, but it is not there. This may be because the Web server has been configured with the wrong base directory for your Web site as a whole, or this page in particular. Perhaps the Web server is configured with the correct base directory, /home/~user/htdocs, but the login page is simply not present, it may not have been uploaded?

Q: When I log out, I can still go back to the password protected pages!

A: It sounds like this site may be using basic authentication realms, where authentication information is passed in the HTTP headers for the protected area of the site. If so, your browser will maintain its authenticated status until it is shut down.

… full answer hidden, click for full answers

Premium members click below for full answer
When I log out, I can still go back to the password protected pages!

Q: How should I handle password reminders?

A: Only the user should know their password, it should not be stored in plain text, it should be encrypted in your database using a one-way hash algorithm like MD5 so the original password cannot be sent by email. You should only allow people to reset their password; don't send their password as a confirmation or reminder. If users forget their passwords, allow them request a reset and send them a confirmation email with a one-time confirmation link. On confirmation, ask users type and repeat a new password. This way people will be expect a reset confirmation email because they requested it and will definitely know if someone has intercepted their message because the link will have expired.

Q: How do I get the IP address of visitors to my Web site?

A: Standard Web server logs may include the IP address of clients and how many requests they make. Log files are usually generated in a plain text format and your server configuration should include options to customise the fields that are recorded.

… full answer hidden, click for full answers

Premium members click below for full answer
How do I get the IP address of visitors to my Web site?

Q: How do I check I have the latest version of Flash in Firefox?

A: Though you have downloaded the latest version of Flash, it may not be installed. Type about:plugins into the address bar of your Firefox Web browser and press Enter. This should give you a list of all the "helper" applications that are installed, including "Shockwave Flash". Check the version number listed there is the version you downloaded and it is enabled.

Server configuration

Q: Can I purge all cached copies of my old stylesheet?

A: No, there's really nothing you can do for people who already have your old style sheet in their cache and re-visit your site. Their cached copy will be saved with whatever cache control settings your stylesheet had when it was first downloaded and will not necessarily be refreshed.

… full answer hidden, click for full answers

Premium members click below for full answer
Can I purge all cached copies of my old stylesheet?

Q: Can I force a style sheet to be reloaded?

A: Yes, you can suggest this is done by an HTTP conformant browser, but it's generally a bad idea to do so. If your users have to load a fresh copy of the stylesheet from the origin server for every page, you're severely diminishing one of the primary powers of external stylesheets; improved site performance. It would also put a considerable hit on your Web server's performance and host bandwidth.

… full answer hidden, click for full answers

Premium members click below for full answer
Can I force a style sheet to be reloaded?

Q: How do I configure the character set for XHTML with Apache?

A: The recommended minimum character set for XHTML is UTF-8, which can be set as part of the content type directive in the relevant .htaccess for a site or document directory, as follows.

… full answer hidden, click for full answers

Premium members click below for full answer
How do I configure the character set for XHTML with Apache?

Q: Where can I find full details of .htaccess file syntax?

A: If you have installed Apache, you will find lots of documentation in the htdocs sub-directory, in directory called manual. This .htaccess files tutorial introduces the subject.

HTTP 403 forbidden errors

Q: This HTTP 403 has just stopped my Windows Explorer out of the blue!

A: The HTTP 403 forbidden error is concerned with how Web site owners control access to the content of their sites. If you encounter this error as web user, it means you are not permitted to view the selected content. Such a problem could be caused by a configuration mistake by the web site owner, but there is nothing you can do to correct it. You should attempt to contact the site owner and explain the problem you found.

Q: How do I fix a 403 error?

A: The purpose of the 403, forbidden, error is to control access to Web resources. To overcome an unwanted 403 error you must reverse this situation. If you have problems accessing a particular file or directory, ensure that the Web server has permission to read those files. Usually, the Web server will operate under a special user account, so make sure that user has read permission.

The second most likely case is that you have requested a virtual directory URL that has no index document and is not configured to list the contents of the directory. In this case, either create an index for that directory or change the settings to permit directory listings. For Apache, use the Options +Indexes directive in the .htaccess file for the directory. This in turn relies upon overrides being enabled in the main http.conf configuration, see Custom error 403, access forbidden.

Q: How do I create a 403 page on IIS to get people to my site?

A: Custom error pages in themselves are not an effective way to get people to your site, but they can be an effective way to retain visitors who run into difficulties and direct them to the parts of the site you want them to see. A custom 403 page is a friendly way to say "access forbidden". If you find that lots of visitors are arrive at forbidden areas of your site it would be best to find out why and make changes to minimise the problem.

There are two main options to configure custom error pages with your Web server, Microsoft Internet Information Server (IIS). You can either set up a plain HTML file to handle the error or a dynamic Web page, the configuration is very similar. First you need to create the relevant Web page with notes to explain the problem the user encountered and what they should do next. It is best if the error page is based on a standard Web site page template, to maintain a consistent look and feel for your site. If you use an HTML file, any cascading style sheets, images and other assets will have to specified with absolute URLs.

Open the IIS configuration dialogue for the relevant Web server and choose the Properties view. Switch to the tab labelled Custom Errors. Choose the HTTP error code you want to configure, in this case code 403 access forbidden. Click Edit Properties and choose either File or URL from the drop-down list. Use the Browse button to choose a custom 403 file, or type the URL of the page you want to handle the error. Click OK to complete.

HTTP 400 bad request errors

Q: Why do I get a 400 error?

A: The HTTP error 400, bad request, means that the Web server received a request that it could not process, because it is not configured to do so, or because it expects certain headers or parameters in the request that are not present.

… full answer hidden, click for full answers

Premium members click below for full answer
Why do I get a 400 error?

Q: How can I resolve a 404 bad request?

A: An HTTP 404 error is also known as a "document not found" error, which is different from an HTTP 400 error, which means a "bad request" was made to the web server, one that it was unable to process. The nature of, and solution to, each error is different, so please be sure which case you have.

Q: How do I correct a 400 bad request?

A: The first thing to consider is why you're getting a 400 error and decide whether it is the best response to give for a particular request. In some cases, 400 is the best response to give and you should stick with it. For instance, many servlet applications give a 400 response if the request parameters have evidently been edited to make a request that is not permitted for security reasons.

… full answer hidden, click for full answers

Premium members click below for full answer
How do I correct a 400 bad request?

Q: Can you correct the bad request on my account login?

A: If you get a 400 error when you log into a website, you should notify the person who operates the website and give them as much detail as you can about the steps you took before the error happened, the browser you were using and any details relevant to the service itself, like your registered user name. Only the people that manage a web site and the web server it runs on can correct a 400 error.

HTTP 404 not found errors

Q: I get "Object not found!" on http://intranet!

A: This error means that the Web server cannot find a default home page for the intranet site you requested. When you make a simple domain request like http://intranet without a URL path, the Web server cannot tell what specific document should be returned. In this case, the server should normally be configured to send a default page, such as index.htm, rather than show an error page.

This problem also applies to virtual directory paths like http://intranet/example. Ideally, hyperlink URLs should include a specific file path at the end, such as http://intranet/example/index.htm, but one cannot rely upon people to type full URLs into their browsers.

The Apache Web server's configuration file httpd.conf normally has a DirectoryIndex directive, as below, to specify the default index page to use in these cases, listed descending priority order.

… full answer hidden, click for full answers

Premium members click below for full answer
I get "Object not found!" on http://intranet!

Q: My profile page gives a 404 error, how can I make it work?

A: There are many reasons you have a missing page error. The most fundamental reason is that the page does not exist because it was not created and saved successfully or it has since been deleted. To correct this problem check the HTML document exists on your web server or content management system and is set to be published.

If a hyperlink is leading to a page not found error another likely reason is that the href attribute of the link does not match the actual URL for the page. Check the link URL compared with the actual working URL for the pages and correct as necessary.

HTTP 500 server error messages

Q: I get "premature end of script headers" for opac-main.pl!

A: The "premature end of script headers" error may be reported for a broad range of problems in which a Perl script fails to complete its execution. This may be caused by a failure to locate the correct Perl installation or supporting modules, key configuration files or a failure to connect to a database. If you did not write the script, it is best to ask for help from the script author or through support services for the script. The Koha for Windows support wiki has one suggestion for the opac-main.pl script problem.

Q: I get a 500 Internal Server Error for my favourite Web site!

A: Without further details it is difficult to say what the server error is, but it is likely that you have set your favourite site as your Apache server host name. Somewhere in your httpd.conf file you may have a line such as:

ServerName: example.com
          

… full answer hidden, click for full answers

Premium members click below for full answer
I get a 500 Internal Server Error for my favourite Web site!

Custom error pages

Q: Why should I be cautious about dynamic error pages?

A: The point of custom error pages is to help the user first and the developer or publisher second. One hazard with sending an automatic email error report is that it may make the problem worse. If you catch an HTTP 404, document not found error and the email script produces a 500, internal server error, the user may not appreciate the difference, and you will get confusing error reports.

This is not a major risk, but worth testing thoroughly to check what happens when the mail server is down, the email address is invalid, or HTTP request headers are missing, for example. If your custom error page looks up the HTTP referer header and the user's browser has this option switched off, what then?

Q: What on earth is a 402 error?

A: This error code is puzzling. According to the HTTP specification, this code is reserved for future use and means "Payment required". It sounds like your Web server is incorrectly configured or you have keyed the wrong figure into a server side script or servlet.

Server execution errors

Q: Apache reports "no listening sockets" and "unable to open logs"!

A: It is difficult to diagnose problems like this without more detailed information, but it sounds like you may already have an Apache HTTP service running on your machine. One of the options during the Apache installation is to create a system service to run the server automatically as a background process. In this case, the service instance of the server will already be listening on the default port 80 and hold the lock on the server logs, which may give the errors you describe.

One way to check if Apache is already running is to press Ctrl + Alt + Del and choose the Task Manager option, then the Processes tab. The Apache service will normally be listed as Apache.exe if it is running. Of course, you can also request the local host URL http://127.0.0.1/ in your Web browser to see whether any service is running.

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager