HTTP_ACCEPT and opera.ini

October 15, 2002

If you want to change Opera’s default HTTP_ACCEPT, you can edit the opera6.ini file in the directory where you installed Opera.

Hat tip: DarkElf in opera.general

Be sure that Opera is not running before you edit any INI file.

Be sure to make a copy of any INI file before you edit it.

This is the default HTTP_ACCEPT for Opera6.05 (build 1140) text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, /

If you wanted to add, say, application/xhtml+xml, you might change it to

application/xhtml+xml, text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, /

(Note: be sure to keep the / at the end, otherwise you will restrict what Opera will accept to only those MIME types listed therein.)

Just a warning, however, that you might run into unexpected situations or obscure bugs if you do this or any other esoteric tweak… but you knew that already, didn’t you?

However, if you do, then you could simplify the script below to look simply for the application/xhtml+xml in HTTP_ACCEPT

(Note: I have found an obscure bug in Opera 6.05 when dealing with linked style sheets and application/xhtml+xml, so I have chosen not to use this myself for my copy of 6.05)

  • Jo

    Heh, first time something I posted on Usenet appears in a blog ;)

    Something else to note: if you alter the string, it is absolutely vital you have / as the last entry — otherwise you are telling a server to only send the listed MIME Types to your browser. (Of course inside a controlled environment such as an intranet, this could be a security feature — if your server only sends application/xhtml+xml, text/css, and image/png, you could limit the string to this).

    Oh, and is build 1141 a typo? My copy of Opera 6.05 is build 1140.

  • http://www.tntluoma.com/opera/beyond30/ TjL

    Oops… 1140 is correct.

    I updated the entry to reflect your comments

Previous post:

Next post: