On 14/07/2011 11:36, Foskett, Mike wrote:

Hi all,

Just finished a major update for Tesco's homepage.

http://www.tesco.com/

Tesco's are the UKs largest retailer and this page gets approximately 1 million hits a day.

The page has been speed tweaked as much as possible given IT / server restraints.

Unfortunately the page now fails W3C formal grammar validation.

Because the page as designed was a massive 1.4MB (previously 260 Kb - 330 Kb), JavaScript was used to fetch image upon demand rather than on-load or post-load.

This greatly reduced the impact on the servers (critical) and improved the initial page load speed.

Obviously a no JavaScript version was also required.

The image references cannot be in the standard CSS as IE loaded all the images, used or not:

                .noJS .imgRef {background:url(...)}

Will not work.

All the image references were placed into a separate CSS noJS.css and the link in a <noscript> and this is where the validation breaks.

Apparently <noscript> is illegal in the <head>, and a <noscript> containing a <link> is illegal in the body.

<noscript>

<link rel="stylesheet" href="/homepages/default/noJS.compressed.css" type="text/css" media="all" />

</noscript>

I went for placing it in the body so the noscript is legal but the link reference is not.

I can see no alternative, and wondered if any of the list members had a more valid solution?

Regards,

Mike Foskett

http://webSemantics.co.uk/ <http://websemantics.co.uk/>


------------------------------------------------------------------------
This is a confidential email. Tesco may monitor and record all emails. The views expressed in this email are those of the sender and not Tesco.

Tesco Stores Limited
Company Number: 519500
Registered in England
Registered Office: Tesco House, Delamare Road, Cheshunt, Hertfordshire EN8 9SL
VAT Registration Number: GB 220 4302 31

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************
Failing that, could you not implement php to check whether there JS is enabled, if not, it can echo the StyleSheet.

--
Mike Flanagan
CCO Telford Computer Doctor
http://www.telfordpc.co.uk

[email protected]
0800 058 8914



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [email protected]
*******************************************************************

Reply via email to