Q&A

Q1:Why bother deleting hidden layers from an Illustrator file before exporting it as an SVG document?
A1: Although it is true that an end-user viewing your SVG in a viewer will not see any artwork that was hidden in Illustrator, there are several reasons to delete this data beforehand. First, excess data that will not be displayed results in extra download and loading time, which users will likely not appreciate, for negligible content. Second, that hidden content can be made visible if a user modifies your code. If the layer was hidden for privacy reasons, you will be sorely surprised when users extract information that wasn't intended for them.

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.