=head1 NAME Workarounds for some known bugs in browsers. =head1 Description Unfortunately for web programmers, browser bugs are not uncommon, and sometimes we have to deal with them; refer to this chapter for some known bugs and how you can work around them. =head1 Same Browser Requests Serialization The following feature/bug mostly affects developers. Certain browsers will serialize requests to the same URL if accessed from different windows. For example if you have a CGI script that does: for (1..100) { print "$$: $_\n"; warn "$$: $_\n"; sleep 1; } And two concurrent requests are issued from different windows of the same browser (for those browsers that have this bug/feature), the browser will actually issue only one request and won't run the second request till the first one is finished. The debug printing to the error_log file helps to understand the serialization issue. Solution? Find a UA that doesn't have this feature, especially if a command line UA will do (LWP comes to mind). As of this writing, opera 6, mozilla 1.0 on linux have this problem, whereas konqueror 3 and lynx don't. =head1 Preventing QUERY_STRING from getting corrupted because of &entity key names In a URL which contains a query string, if the string has multiple parts separated by ampersands and it contains a key named "reg", for example C, then some browsers will interpret ® as an SGML entity and encode it as C<®>. This will result in a corrupted C. The behavior is actually correct, and the problem is that you have not correctly encoded your ampersands into entities in your HTML. What you should have in the source of your HTML is C. A much better, and recommended solution is to separate parameter pairs with C<;> instead of C<&>. C, C and C<$r-Eargs()> support a semicolon instead of an ampersand as a separator. So your URI should look like this: C. Note that this is only an issue within HTML documents when you are building your own URLs with query strings. It is not a problem when the URL is the result of submitting a form because the browsers have to get that right. It is also not a problem when typing URLs directly into the address bar of the browser. Reference: http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2 =head1 IE 4.x does not re-post data to a non-port-80 URL One problem with publishing 8080 port numbers (or so I have been told) is that IE 4.x has a bug when re-posting data to a non-port-80 URL. It drops the port designator and uses port 80 anyway. See L. =head1 Internet Explorer disregards your ErrorDocuments Many users stumble upon a common problem related to MS Internet Explorer: if your error response, such as when using C or C<$r-Ecustom_response>, is too short (which might often be the case because you aren't very inspired when writing error messages), Internet Explorer completely disregards it and replaces it with its own standard error page, even though everything has been sent correctly by the server and received by the browser. The solution to this is quite simple: your content needs to be at least 512 bytes. Microsoft describes some solutions to this I here: http://support.microsoft.com/support/kb/articles/Q294/8/07.ASP . The easiest solution under Perl is to do something like this: # write your HTML headers print ""; # write out the rest of your HTML Effectively, your content will be long enough, but the user won't notice any additional content. If you're doing this with static pages, just insert a long enough comment inside your file to make it large enough, which will have the same effect. =head1 Maintainers Maintainer is the person(s) you should contact with updates, corrections and patches. =over =item * Stas Bekman [http://stason.org/] =back =head1 Authors =over =item * Stas Bekman [http://stason.org/] =back Only the major authors are listed above. For contributors see the Changes file. =cut