WebPagetest Forums
Need some "did you know..." tips - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Announcements (/forumdisplay.php?fid=8)
+--- Thread: Need some "did you know..." tips (/showthread.php?tid=672)



Need some "did you know..." tips - pmeenan - 04-15-2011 06:17 AM

Have any suggestions to share about WPO, tools, using WebPagetest, configuring Apache, etc?

I'm adding a tip box to the test progress page so people have something to read while they wait for their test complete and hopefully it can be educational. If you have anything you'd like to share (and don't mind me using) please post it here, otherwise you'll be subjected to my random musings :-)

Thanks,

-Pat


RE: Need some "did you know..." tips - stoyan - 04-15-2011 07:06 AM

CSS expressions are bad, but if you really must use one, you can make it self-rewriting:

.the-thing {
background-color: expression(this.runtimeStyle.backgoundColor = 'none', [your code here]);
}

More: http://www.phpied.com/a-rounded-corner/
More: http://www.smashingmagazine.com/2011/03/19/styling-elements-with-glyphs-sprites-and-pseudo-elements/


RE: Need some "did you know..." tips - pmeenan - 04-16-2011 12:36 AM

Tips are live now (well, all "2" of them I have so far anyway Smile). You should start to see them on the testing page and you can see all of them by going here: http://www.webpagetest.org/tips

Keep them rolling in!

Thanks,

-Pat


RE: Need some "did you know..." tips - Bushido - 06-25-2011 11:34 AM

- echo is faster than print.

- Wrap strings in single quotes (‘) instead of double quotes (“) for added speed. Why? because PHP searches for variables inside “…” but not in ‘…’

- RTFM!

ok, maybe that last one won't cut it, but far too often people don't optimize their code because they just don't READ THE... MANUAL!