Forum Moderators: phranque

Message Too Old, No Replies

http headers, error or correct

         

helenp

12:06 pm on Jul 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi, I have problems, and checking the http header
I get result Content-Type: text/html

however when I check many other sites they get:
Content-Type:text/html; charset=UTF-8


I have the charset declared.
Is this normal or a bug in the host?

badbadmonkey

10:47 pm on Jul 30, 2011 (gmt 0)

10+ Year Member



You can declare charset in the Content-Type header or as a meta tag in the content.

The advantage to doing it as a meta tag is that the encoding will be correctly set should the page be saved locally to a client computer (the headers are obviously lost in this case). On the other hand the header method is slightly more elegant and uses a few characters less in the pursuit of ultra optimization.

Neither above is incorrect and shouldn't cause problems.

If you have problems you should describe what they are so others can help.

helenp

11:23 pm on Jul 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks,
The problem is from another post (http://www.webmasterworld.com/webmaster/4344217.htm), as it is so long already, and sort of mixed up, wanted to separate the questions.

In this I only wonder if it is correct when I do a call with webnamedomain.net to my domain and get as result:
Connection:close
Transfer-Encoding:chunked
Content-Type:text/html

I wonder if this is correct as I see many other sites getting both text/html and charset in the content-type,
and I conly get text/html even though I have the charset declared.

Just wondered if there is some bug in the host, or this is normal, as I gets error with the declaration.

I have declared the charset like this, this comes in the head after title.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

[edited by: helenp at 11:59 pm (utc) on Jul 30, 2011]

badbadmonkey

11:47 pm on Jul 30, 2011 (gmt 0)

10+ Year Member



That is the meta tag HTTP equivalent in your content, it is not an HTTP header. What you are seeing is what should be expected. If you want to see the charset in the HTTP headers you need to put them there, using server side scripting or Apache. But it doesn't matter, what you have is fine.

Your problems relating to mobile browsers: I don't know Blackberry but generally it's not wise to expect too much from mobiles. I think the Android Browser and Safari on iPads/iPhones are pretty good, I have little confidence in others. Your best bet is to make everything as simple as possible. No fancy JavaScript or CSS. And don't worry about minor errors on the mobile.

If you really need to serve mobile audiences with 100% reliability and don't want to compromise your site, then it would be best to make a dedicated mobile site.

Your text encoding issues seem to relate to e-mail though, not HTML pages, and this is very different. E-mails can be tricky to get working correctly with the right encoding if you are writing the mail script yourself. It sounds like you will have to examine your e-mail script or its set-up - it seems it is not correctly encoding the input.

helenp

12:08 am on Jul 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks badbad monkey:

No fancy JavaScript or CSS. And don't worry about minor errors on the mobile.

If you really need to serve mobile audiences with 100% reliability and don't want to compromise your site, then it would be best to make a dedicated mobile site.


No CSS? none at all? For me css is the most important on a website, or do you mean only the necesarry css?
wont go back to tables lol.

I have not thought about mobiles before as I saw my site some years ago on my sons mobile and was ok, but its the futere, there are more and more devices and people uses them more and more, I often get emails from blackberries and iphones now a days.

To do a dedicated mobile site, thats a big question, read for exampel that some people dont like facebooks and other mobile sites, they want to see the normal site, and practically, how do I convert about 500 pages?
Doing them one by one, sort of difult to imagine how the page would look like when you ever seen any...
Arent there any webpage or program to browse the web as if you uses a mobile?

badbadmonkey

1:17 am on Jul 31, 2011 (gmt 0)

10+ Year Member



For me css is the most important on a website, or do you mean only the necesarry css?

I said no fancy CSS, try to avoid CSS3 for the time being, and animations, etc. Your complaint in the other thread was talking about CSS menus not working on Blackberry browser. A simple layout should work in any browser, it seems you must be doing something a bit tricky for it to fail - maybe start another thread specific to the Blackberry and post your HTML and CSS code that isn't working.

There are more and more devices and people uses them more and more, I often get emails from blackberries and iphones now a days.

In my stats I see 90% iDevices and a growing number of Androids. Other platforms are negligible in my opinion but obviously you should look at your own figures. (E-mails don't reflect web visits though).

they want to see the normal site, and practically, how do I convert about 500 pages?


Oh I don't think you should, but if you can't/won't solve the CSS problem above and Blackberrys are critically important to you then you might need to think about it (unlikely). As above Safari and Android do a very good job in my experience.

Arent there any webpage or program to browse the web as if you uses a mobile?

Not that I know of and I wouldn't trust any 100% anyway, you need to use the actual phone/tablet OS and browser software to be sure. Hopefully there'll be a mobile or two added to sites like BrowserShots.org some day but there's nothing for now.

~

Go start a thread specific to your CSS issue and Blackberry in the CSS forum, and if you find a solution to that you will probably be happy.

helenp

9:04 am on Jul 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I said no fancy CSS, try to avoid CSS3 for the time being, and animations, etc. Your complaint in the other thread was talking about CSS menus not working on Blackberry browser. A simple layout should work in any browser, it seems you must be doing something a bit tricky for it to fail - maybe start another thread specific to the Blackberry and post your HTML and CSS code that isn't working.


I dont use any Css3 at all, as the site I changed to css3 some years ago, and it was not even ready then.
The menu is sort of big to post I afraid, but I suppose its the best. Its peterneds whatever hover menu.

Just checked my google stats and mobile users was last month 10.29%, not much, but should be considered at I suppose it will be a growing number.

pageoneresults

2:33 pm on Jul 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Arent there any webpage or program to browse the web as if you uses a mobile?


W3C mobileOK Checker
[Validator.W3.org...]

About The W3C mobileOK Checker
[Validator.W3.org...]

I've used the above validator to assist in making documents "more" mobile friendly. It is very difficult to achieve high percentages for most sites that I've tested. Google gets 100% which last time I checked, it was at 92% I think. WebmasterWorld gets 3%. :(

It's an excellent tool as it gives you information on what you can do to make your site more mobile friendly based on the issues it found.

Its peterneds whatever hover menu.


Ah-ha, me favorite. Use it on almost every site but, I've removed the reference to the .htc file, it appears that it is not needed anymore? I've been running without it now for over a year with no ill effect that I'm aware of.

helenp

3:07 pm on Jul 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Dear Pageoneresult,
I used thattool, however not sure if the results are ok, as it seems to give some errors that are not correct.
At least I understand so if you see my other thread.

I have not removed tha .htc file, however I have it in a code if ie only, so maybe can take away.

lucy24

4:08 pm on Jul 31, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hover may be the one thing that definitely won't work on mobiles, for the perfectly sound reason that there's no mouse ;) I've got one page with a hover-activated scrolling thingie. The iPad simply interprets "onhover" as "onclick", meaning that it will scroll but won't stop. Unless you click somewhere else.

The idea of "mobile" and "ie" in the same application makes my blood run cold.

On sober consideration I think the whole charset business is a bug in the validator, because you can see for yourself that mobile devices are interpreting the characters correctly.

helenp

7:32 pm on Aug 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I been thinking at changing to an onclick menu instead of hover, however have to be that you open and close and in several levels...dificult to find a good one as I have a lot of links in the menu.
Maybe one could put a code inside the normal webpage, if mobile device not that menu, this instead?
Same as one could serve special content for ie.
No idea.
Dont feel like doing a special page for mobiles.