I typically minify my .css
file because it's something I am used to when developing websites, but I have seen some people actually minify their .xml
files (such as the .ncx
, .opf
, etc.). I have always wondered if anyone has seen a noticeable difference when viewing a minified .epub
file on a device?
-
1Please pardon my ignorance, what does it means to "minify"?– SekhemtyCommented Mar 7, 2014 at 17:29
-
3@Sekhemty minifying CSS (or HTML) normally involves making something as small as possible, by e.g. removing superfluous whitespace, unnecessary punctuation etc. Without changing the meaning of the text for a program (but making it more difficult to read for humans). In javascript this often involves shortening of variablenames as well.– AnthonCommented Mar 7, 2014 at 17:35
-
@gramps I added a link to explain Minify, If you feel it is unneeded, I will not be offended if you remove it.– James JenkinsCommented Mar 7, 2014 at 20:44
-
After reading the Wikipedia article and searching around, I don't see any reason to minify epub. The two main reasons are to make long code run quicker not always a help or to speed download time, neither of which is a big concern with an ebook.– James JenkinsCommented Mar 7, 2014 at 20:58
1 Answer
Personally, I never minify code in ebooks. A big part of the reason for that is that unlike many here, I don't use Sigil or Calibre to edit my epub files—I use either Notepad++ or Geany depending on the OS I'm working in. Because I'm always working with the code, it does nothing but make my life harder if I've minified the whole thing and the client comes back to us with two or three rounds of proofing corrections.
On top of that, many in the publishing world are starting to talk about using HTML5 as a base format for all their books. Since epub 3.0 content files are HTML 5, you're pretty much working directly with the source files when you're working with the epub, and the source files should be human-readable so that any problems that come up with them can be easily fixed.
Finally, the point of minifying code is to let files transfer across networks more quickly, which is a non-issue for ebooks where everything is local.
-
Sometimes minification is used to obfuscate the code, making modifications difficult. Commented Nov 9, 2015 at 18:22