UserJS.org

Fix content type

  • Published: 2005-05-30 22:06
  • Modified: 2005-09-19 09:19
  • Author: TarquinWJ
  • Requires: Opera 8.0
  • Install as: Opera User JS

Learn how to install scripts

Report a bug

If HTML pages are incorrectly served as text, this script attempts to correct them, and load them as HTML. It detects these pages by seeing if they have either a HTML or BODY tag in the first 256 bytes (this approximates the algorithm used by Internet Explorer), with a couple of extra conditions for text files, etc. This is not perfect, and it may generate a few false positives and negatives. For false positives, you can hit the back button to go back to the plain text. For false negatives, you can use the ‘Force HTML’ bookmarklet.

Note: This script will add an extra history entry for every page that it fixes.