The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex
The functionality is exactly the same - just open the minified and the "normal" versions in a text editor and you'll see the difference.
ReplyDeleteThe min-Versions are just there to provide reduced filesize, to save you bandwith and traffic ;-)
...in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code, without changing its functionality.
ReplyDeletehttp://en.wikipedia.org/wiki/Minification_(programming)
Its been "minified". All the functionaility is there, just in a minified version that is smaller for saving transfer bandwidth.
ReplyDeleteThings to become "minified":
Remvoing whitespace
Renaming some variables - such as function-scoped variables, not function names.
Here is an example
function myFunction(someReallyLongParamName)
{
someReallyCrazyName = someReallyLongParamName;
}
could be come
function myFunction(a){b=a;}
Minified versions just have whitespace removed, to make them faster to download. Otherwise, they are identical.
ReplyDeleteno, exactly the same function, the text has been minimized to reduce the download, this means you cant really debug in it but you do get the same functionality
ReplyDeleteSmaller size because all of the white space is removed from the file. Just open both files in text editor and you will see.
ReplyDeleteThis is a version of jQuery that has a smaller file size (minified). Same functions, just a smaller file that the browser has to download.
ReplyDeletesame functions...smaller size. Think of it as poor mans compression. They simply remove all unneccessary whitespace.
ReplyDelete