Closed Bug 727914 Opened 12 years ago Closed 9 years ago

[One Mozilla - Tabzilla] Minify tabzilla JS and CSS reference code on mozilla.org

Categories

(Websites :: Tabzilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: wenzel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [kb=1452025] )

Tabzilla -- to be used by many websites -- is deployed as unminified JS and CSS on mozilla.org right now, that's kind of sad for performance. Can we deploy this as minified code instead?
Component: www.mozilla.org/firefox → www.mozilla.org
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Component: General → Tabzilla
Product: www.mozilla.org → Websites
Target Milestone: --- → 1.5
Sorry for the bugspam -- the Target Milestore was set unexpectedly.
Target Milestone: 1.5 → ---
Much has changed since the filing of this bug. The CSS is in fact now minified and both the JS and CSS are served by a global CDN. The new urls and installation instructions are:

http://bedrock.readthedocs.org/en/latest/tabzilla.html

The JS is indeed not yet being minified because it is a dynamic view. We've discussed on-the-fly minification in bug 959359, and I believe we should do that. Our webservers do gzip JS when requested, and that reduces the size of tabzilla.js from 29k to 9.6k. But you're right that this could be further reduced. Hopefully we can knock this out soon.
Whiteboard: [kb=1452025]
My recommended library for doing this is https://github.com/rspivak/slimit
While we're at it, can we stop tabzilla from loading jquery (especially if we detect it's already on the page)?

https://www.dropbox.com/s/8syeiyf4wv5tl5h/Screenshot%202014-10-01%2014.21.14.png?dl=0
(In reply to Christopher Van Wiemeersch [:cvan] from comment #8)
> While we're at it, can we stop tabzilla from loading jquery (especially if
> we detect it's already on the page)?
> 
> https://www.dropbox.com/s/8syeiyf4wv5tl5h/Screenshot%202014-10-01%2014.21.14.
> png?dl=0

Tabzilla should only be loading jQuery if the page doesn't already provide a sufficient version. See https://github.com/mozilla/bedrock/blob/master/media/js/test/spec/tabzilla.js#L12
(In reply to Steven Garrity [:sgarrity] from comment #9)
> (In reply to Christopher Van Wiemeersch [:cvan] from comment #8)
> > While we're at it, can we stop tabzilla from loading jquery (especially if
> > we detect it's already on the page)?
> > 
> > https://www.dropbox.com/s/8syeiyf4wv5tl5h/Screenshot%202014-10-01%2014.21.14.
> > png?dl=0
> 
> Tabzilla should only be loading jQuery if the page doesn't already provide a
> sufficient version. See
> https://github.com/mozilla/bedrock/blob/master/media/js/test/spec/tabzilla.
> js#L12

I wonder if tabzilla can do be backwards compatible with older versions of jQuery. And what would it take for tabzilla to eliminate its dependency on jQuery?

I filed bug 1076389 on AMO's side.
Blocks: mozorg-opt
Note:  Jen to discuss this with Josh and Pmac in the context of:  2015 roadmap and possible upcoming changes to Tabzilla
See Also: → 1145172
As you might know, Bug 1151579 has replaced Tabzilla with a static Mozilla tab. The old assets are still available, but no site is probably using it. Closing all Tabzilla-related open bugs at this moment.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.