![]() |
Force browser to Parse XML as HTML
I am on a sailing boat in the islands around Greece in the Mediterranean. For internet (particularly weather forecasts) I am using a Greek mobile phone service which is intended for WAP (it's called Wind Plus non-stop). I have both a laptop (Linux + Firefox) and a Nokia N810 - both using a Nokia N70 phone as a modem. I use the Nokia N810 in preference to the laptop because it uses little power - important on a boat.
The mobile service requires me to use an HTTP proxy. I'm not sure exactly what this proxy does but one effect is to mangle the XML code for sites which use XHTML. Firefox (laptop) and MicroB (N810) just give an XML parsing error. This applies to very many sites - this forum for example. This is a known problem amongst Greek geeks and their work-round, apparently, is to use Opera which has a 'reparse as HTML' facility. I have part-solved this in Firefox on the laptop by using the Force Content Type addon. I change all content from application/xhtml+html (which causes gecko to parse XML) to text/html. ('Part solved' because although I can now display XHTML sites but some of them don't work: eg. I can view but cannot update my own wordpress blog.) So there are, I think, 3 possible solutions on my N810: - use Opera. Can I do that? - implement a 'reparse as HTML' facility in MicroB, like Opera has - implement the Force Content Type addon. It that easy? Any comments welcome. At the moment the laptop is usable but the N810 is not. |
Re: Force browser to Parse XML as HTML
Yes, Opera (from previous OS releases) has been coaxed to run on OS2008; it's not trivial, and it's not the same as Opera on the desktop, so it might not even help. There's a thread around here on it.
The others are substantially harder, but at least you know they'd work. One other possibility is to use some other proxy to reformat web pages (e.g. the ones listed here). I don't know that any of those will be satisfactory; while they will probably recast it as html, they specialize in mucking with the content, too. :( |
Re: Force browser to Parse XML as HTML
How about just saving the page, changing the extension to .html (if it's not already) and then open the the file? Since the file doesn't come with an incorrect HTTP header, that might work. Although this doesn't help much for "browsing around", it might help in getting weather reports (as you can do it for the pages you need)
Martin |
Re: Force browser to Parse XML as HTML
It seems to me that the mimetype should be changed to text/html. Could a local proxy do that maybe? We already have Privoxy.
|
Re: Force browser to Parse XML as HTML
Yes, that would probably work.
|
Re: Force browser to Parse XML as HTML
Thanks for all the replies.
Quote:
But it's remarkably tedious - even on a laptop with a mouse and with all the normal linux facilities for renaming files and dragging them into the browser. I was hoping for something easier. It doesn't need all the facilities of Force Content Type - All it needs is to change the content type of every input site to text/html. I would have thought a few lines of userchrome would do it - but I'm guessing. [I would normally discuss that on Mozilla usenet but this proxy doesn't allow NNTP - and nobody will take any notice if I post with GoogleGroups - even if that works :-( ] |
Re: Force browser to Parse XML as HTML
Quote:
If you save the webpage, and view the disk file in MicroB, you just see the XML parsing error message. |
Re: Force browser to Parse XML as HTML
perhaps you can grab the page(s) with wget, then rename them to .html, and then feed them to microb...
|
Re: Force browser to Parse XML as HTML
It seems not too hard to do with Privoxy. Override the http content-type header for selected domains:.
Info on setting up privoxy on the Tablets can be found here. |
Re: Force browser to Parse XML as HTML
Quote:
Fortunately many of the weather sites work OK - they're rather simple. But most forums, blogs, and newspaper sites seem to use content type application/xhtml+xml and they don't work. |
All times are GMT. The time now is 00:48. |
vBulletin® Version 3.8.8