[TYPO3-english] TS Conditions for Internet Explorer

Stephan Schuler Stephan.Schuler at netlogix.de
Thu Sep 5 00:44:01 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hey there.


I would go for the HTML thing, too. But with a slightly different approach.

Think about this one:

[pre]
> <!DOCTYPE html>
> <!--[if lt IE 7]> <html class="no-js ie6"> <![endif]-->
> <!--[if IE 7]> <html class="no-js ie7"> <![endif]-->
> <!--[if IE 8]> <html class="no-js ie8"> <![endif]-->
> <!--[if gt IE 8]> <!--><html class="no-js ie9"> <!--<![endif]-->
[/pre]

There's more than only having less conditions to be evaluated even for cached runs.

I would recommend to enable both, CSS and JS concatenation. The less HTTP requests your browser has to do for a page load, the better the overall performance. It's not about having a couple of bytes for on the wire but about reducing the number of requests. So using a single CSS file that covers all possible condtions is the way to go, and adding condition-giving classes to the HTML tag allows you to do so.

Another thing is cache not the umber of different conditins to be evaluated but the number of possible combinations. If you have 10 languages with 9 conditions for e.g. switching locale, you have 10 different cached versions of nearly equal TypoScript. Adding a single that creates pre-ie8 and post-ie8 variants double the number, so you have 20 different versions of nearly equal TypoScript inside your cache. Switching PidInRootline for some extension config gives you 20 times yes and 20 times no on this, so you end um having 40 times almost equal TypoScript. The thing is: The more different variations of condtion combinations you have, the more space your cached TypoScript will consume. I'm currently on a project where the TypoScript cache table (which contains one serialized array of TypoScript for each condition combination) has 100MB overall. Ok, projects of this sice don't care about 100MB database tables. But here is one option that's clearly not necessary.

The third thing is a potential CDN or Varnish cash hit rate for static files. If there's only one CSS file for all your visitors, then you will have exactly one cache miss. If you create concatenated CSS files that depend on several conditions (e.g. PidInRootline to disable plugin specific CSS on pages that don't have this plugin) then you create more cache misses.
If the very first request on your start page is 5ms slower for fetching 100KB more CSS which is not needed on your start page, that's not a problem at all.
All other requests being 3ms slower and fetching 95% known CSS and 5% page-unique CSS (assuming that we stick to using concatenated CSS) is both, slower and more annoyjng.

So it's not about the question if IE should be detected by TypoScript. Only taking care about IE gives a clear "doesn't matter".
The real thing is: The more CSS decisions your browser can do, the better the performance.


Kind regards,


Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de



- --
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Neuwieder Straße 10 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



________________________________________
Von: typo3-english-bounces at lists.typo3.org [typo3-english-bounces at lists.typo3.org]&quot; im Auftrag von &quot;Sergio Catalá [scatala.enet at gmail.com]
Gesendet: Mittwoch, 4. September 2013 14:23
An: Viktor Livakivskyi; TYPO3 English
Betreff: Re: [TYPO3-english] TS Conditions for Internet Explorer

Hi Viktor,

On 04/09/13 11:52, Viktor Livakivskyi wrote:
> Hi, Sergio.
>
>> page.headerData.10 = TEXT
>> page.headerData.10 {
>>                          value =
>> typo3conf/ext/myextension/Resources/Public/Css/font_ie7.css
>>                          insertData = 1
>>                          wrap(
>>                                  <!--[if lt IE 8]>
>>                                          <link href="|"
>> media="screen" rel="stylesheet" type="text/css" />
>>                                  <![endif]-->
>>                          )
>>                  }
>>
>
> I would recommend this variant, because more conditions you have in
> your TS - more evaluations are performed by TYPO3 by every page load
> (even for cached pages), which affects performance.
> Ideally you should have only conditions with language in your TS setup.

Thanks for your answer. For other side, I was just thinking that this
way there is "more HTML code" that has to be downloaded in the page,
every time, even if you're not using IE.
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.3.0 (Build 9307)
Charset: utf-8

wpUDBQFSJ7ezpp0IwsibV8MBCMFhA/0Z887VVJ5GmUDkRINFAr6euzM5ZLetxQ/Q
DXNUwASJdg38VAR6cJHKYVmEMSJJSqTTPAzKxeRX49YQqifqtKD4fKi9Sa4UlMXz
aSFRKAsOEBUMx85JY38fMFBORj5dFfDbl2RpfGpzC0PMZESxR5ylJkQeNiZnfIjs
OPcec+pVBQ==
=Ys8a
-----END PGP SIGNATURE-----


More information about the TYPO3-english mailing list