9th Dec 2011, 07:10 PM | #1 |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
|
Hi, I'm trying to validate a mobile site I'm working on in the W3C mobileOK Checker. I'm getting a couple of issues that I'd like to fix, but I'm not sure how. 1. "The document is served without caching information ("Expires" or "Cache-Control" header)" 2. "The HTTP Content-Type header does not specify a character encoding and no UTF-8 encoding or a non-UTF-8 is specified in the XML declaration" Any ideas how to fix these two issues? The documentation it links to is a little confusing. thanks W3C mobileOK Checker |
9th Dec 2011, 07:29 PM | #2 |
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
1. Try adding this line in the head section of the page: <meta http-equiv="Cache-Control" content="max-age=600" /> 2. You need a line like this in the head section of the page: <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> |
| |
The Following User Says Thank You to WillR For This Useful Post: |
9th Dec 2011, 07:46 PM | #3 | |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
|
Thanks, my index file already has the <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> in the head, so I'm not sure why it's giving me the error. I'll add the cache-control one since I didn't have that already. thanks for your help. | |
9th Dec 2011, 07:58 PM | #4 | |
I Do Voice Over Work War Room Member Join Date: 2011 Location: Oregon
Posts: 581
Thanks: 34
Thanked 129 Times in 96 Posts
|
<?xml version="1.0" encoding="UTF-8" ?> Also, keep the meta one in there too (in the head section)... it takes both. Now, I'm not going to pretend like I'm some coding expert. I just did some searching around and found out this works. Someone more knowledgeable can explain why!! | |
I do voice over work... here's a SAMPLE | ||
The Following User Says Thank You to rlhurst For This Useful Post: |
9th Dec 2011, 08:10 PM | #5 | |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
|
| |
9th Dec 2011, 08:28 PM | #7 |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
|
I've got one other question. Would either of you (or anyone) know of a way to reduce the file size of a css file? I'm using jquerymobile for the site and it has a huge css file that's affecting the total size of the page. My images are small, my index.html is small. I'm just having trouble with the massive css file. It's not a huge deal. I'm at 62% on the W3C checker, so it's not completely failing. thanks |
9th Dec 2011, 08:32 PM | #8 | |
I Do Voice Over Work War Room Member Join Date: 2011 Location: Oregon
Posts: 581
Thanks: 34
Thanked 129 Times in 96 Posts
|
You should be way better than 62% imo | |
I do voice over work... here's a SAMPLE | ||
9th Dec 2011, 08:44 PM | #9 | |
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
In regards to reducing the size of the CSS file you can use a CSS compressor. They will strip out all the unnecessary white space etc. There are several free ones online such as this: CSS Compressor For reducing the size of your images I use GIFbot: GIFbot | |
| ||
The Following User Says Thank You to WillR For This Useful Post: |
9th Dec 2011, 08:47 PM | #10 | |
I Do Voice Over Work War Room Member Join Date: 2011 Location: Oregon
Posts: 581
Thanks: 34
Thanked 129 Times in 96 Posts
|
| |
I do voice over work... here's a SAMPLE | ||
9th Dec 2011, 08:49 PM | #11 | |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
|
index file: 2.6kb images: 14.5kb style sheets: 44.2kb My most major error is this: "The CSS style sheet is not syntactically valid CSS", so I checked the w3c css validator and it's saying things like text-shadow and corner radius doesn't exist in css 2.1, but exists in css 2 and css 3. The CSS style sheet comes from jquerymobile. the jquerymobile mobile site also gets a low score, so maybe they haven't updated to the w3c standards yet. | |
9th Dec 2011, 08:50 PM | #12 |
Web Marketing For Profit War Room Member Join Date: 2002 Location: Brisbane
Posts: 2,895
Thanks: 8
Thanked 1,162 Times in 528 Posts
Blog Entries: 10 |
If you use the jquery it will almost always access the google api which will drag your score down to about 65 or less because it contains a lot of images. You can check this by clicking on the various score and below it will say where and if you click on this it will provide where it is falling down. It is always a compromise between whether you want validation or an interactive site. Those that go the validation route often sacrifice looks and experience for speed which is good if that is what the customer wants. Quentin |
DIY Product Creation Online Business Training on How To Create Products to sell online Plus Lots More. | |
9th Dec 2011, 08:52 PM | #13 |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
| |
9th Dec 2011, 09:02 PM | #14 | ||
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
No, it doesn't make a difference where you host it. The page still needs to load that CSS content regardless of where it is hosted. The only way to improve the CSS file is to remove all the styles that you are not using and to run it through a compressor.
From an end-user standpoint though, make sure that your site still looks good and is easy to read if CSS3 styles were disabled.
You also need to remember the W3C standards were introduced for a reason. They are the standards that most developers of browsers, etc will follow so the more you can adhere to those standards yourself, the greater the number of devices your site will work across. It's a juggling act at the end of the day and there is no right or wrong answer. Whatever works best for you is the right answer. | ||
| |||
9th Dec 2011, 09:09 PM | #15 | |
HyperActive Warrior War Room Member Join Date: 2011
Posts: 155
Thanks: 111
Thanked 16 Times in 15 Posts
|
| |
9th Dec 2011, 09:50 PM | #16 | |
Digital Marketer War Room Member Join Date: 2010 Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
|
In regards to testing, don't get too concerned about testing the sites on desktop browsers since most mobile phones use different browsers or different versions of those desktop browsers. | |
| ||
Bookmarks |
Tags |
checker, mobileok, problems, site, validating, w3c |
| |