Welcome,
Guest
. Please
login
or
register
.
Username :
Password :
September 10, 2010, 10:50:45 AM
Home
Help
Search
Register
Login
Finch and Chimps - Imaging Media Resource
>
Internet and Web
>
Webmaster Tools
>
Online CSS Minifier
Pages: [
1
]
Go Down
« previous
next »
Send this topic
|
Print
Author
Topic: Online CSS Minifier (Read 530 times)
0 Members and 1 Guest are viewing this topic.
robertwatcher
Alternative Viewpoint
Administrator
Hero Member
Offline
Gender:
Posts: 774
Alternative Viewpoint
Online CSS Minifier
«
on:
February 03, 2010, 08:55:42 AM »
Whenever possible, I prefer to keep my styles sheets compressed to benefit from the smallest file size possible. (I also like to keep most of my styles in one style sheet so that there fewer requests to the server).
Because I use maximum compression with excess white space and comments taken out - I have to keep 2 versions of my style sheet - - - one for easy reading and editing, and then the minified one that I generate after editing is complete. I have been following the popular naming convention of "style.css" for the uncompressed file, and "style-min.css" for my compressed file.
While there are several very good online tools for cleaning up CSS code - some which allow various levels of compression - - - my needs are simple. And so with that agenda, I threw this script together last night.
It isn't complex and doesn't have fancy algorithms.
It simply returns the file contents of a particular style sheet url with extra white space and comments removed. A couple of simple safeties are built in that return an error when a url has not been entered, and also when the file extension of the url is not ".css". I also threw in a little bit of Jquery and Javascript code so that the returned code could be selected (cross browser I hope).
MINIFY CSS STYLE SHEETS ONLINE:
-------
«
Last Edit: February 03, 2010, 10:05:59 AM by robertwatcher
»
Logged
Rob
A Creative Edge in Photography by Robert Watcher
www.robertwatcher.com
Contact me at
robertwatcher@hotmail.com
Pages: [
1
]
Go Up
Send this topic
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Products & Services
-----------------------------
===> phpCrazySite Upgrades, Mods, Hacks and Customizations
===> phpCrazySite Support
=> PSS: phpSimpleSite
=> OPG: OnePageGallery
=> Modules, Utilities, Interfaces
===> FileUploadUtility
===> SimplePaymentsWebpage
===> OnePageClientLogin
===> OnePageAlbumGallery
-----------------------------
Internet and Web
-----------------------------
=> Webmaster Tools
=> Web Coding
=> Web Design
=> Flash, XML
-----------------------------
Photography
-----------------------------
=> Cameras, Lighting, Methods
=> Computers and Software
=> Post production and Printing
=> General Photography Discussion
-----------------------------
Display and Presentation
-----------------------------
=> Albums and Books
=> ShowItWeb
=> SoundSlides
=> PicturesToExe
=> Flash Slideshow Maker
-----------------------------
Video and Animation
-----------------------------
=> Video
=> Animation, 3D, CGI, HDR
-----------------------------
Audio
-----------------------------
=> Audio
=> DAWs, Digital Audio Periferals and Recorders
=> Audio Recording Software
Little Buddy and the Voice of Reason by Timothy M Watcher
Loading...