Home > Technical Support > FAQ > Server Configuration

FAQ: Server Configuration

Sketchpad documents on my Web site display as gibberish in my visitors' browsers, rather than download properly. How do I configure my Web server to identify the appropriate MIME types for Sketchpad documents that I publish?

(Note that this FAQ applies only if you are a Web author who is publishing Sketchpad documents on your own Web site. If you are having trouble accessing Sketchpad documents on somebody else's Web site, please read about configuring your browser.)

When a visitor to your Web site clicks on a Sketchpad document which you are offering via a Web-page link, whether the file is downloaded to the visitor's disk depends on your visitor's browser:

  • Most older browsers see that the file ends in the .gsp file extension, which—unlike files that end in .htm or .html—is not a type of file that the browser knows how to display. Therefore it attempts to download the file (perhaps after first asking the user what to do).

  • Some newer browsers, however, ignore the file's extension, and instead look at the MIME type that your Web site uses to describe the file. If the MIME type is one that indicates the file should be downloaded, then the browser attempts to download the file (again, perhaps only after first asking the user whether and where to download it). However, if the MIME type does not indicate that the file should be downloaded, the visitor's browser may attempt to display the file directly in a browser window. The result is a Web page containing only gibberish (since gsp files are designed to be read by Sketchpad, rather than be displayed by browsers).

Clearly, as a Web publisher, you want visitors to be able to download your published files successfully. While users can often workaround a misconfigured Web server by choosing Save Link to Disk rather than clicking on your links, it's in your best interest to have your Web server configured to correctly identify its .gsp files as downloadable application files when your server is visited by newer browsers.

In order for your server to be properly configured, it should associate the MIME type application/x-gsp with the file extension gsp. On an Apache-style server, for example, one can make this association by adding

AddType application/x-gsp gsp

to the main server configuration file or to a .htaccess file stored in your download directory. However, only attempt such configurations if you have experience modifying your server or htaccess file! Incorrect modification of these files can quickly result in your entire Web site becoming inaccessible to your visitors. Consult your webmaster if you are at all unsure about changing these files.

Finally, if all else fails and visitors to your site are still unable to download .gsp files, you can replace your .gsp files with compressed ("zipped" or "stuffed") copies of the same, created by tools like WinZip or Stuffit. Both browsers and servers are more likely to recognize the file type or extension of these common Internet formats (.zip and .sit) and download them successfully. There are two drawbacks to offering compressed files, however. First, your visitors will need the appropriate decompressor to access the compressed archive. Historically, .zip has been a PC compression format and .sit a Macintosh compression format, meaning that your visitors are likely to have only one or the other type of decompressor but not both. Finally, since in this scenario you are publishing Zip files or StuffIt archives rather Sketchpad documents, when visitors click your links, Sketchpad will not automatically open on their computers. They will need to launch Sketchpad manually in order to access the .gsp file once it has been decompressed from its archive. For these reasons, publishing .gsp files directly, with a Web server configured to identify them with the correct MIME type for downloading, is usually preferrable to publishing compressed archives.