I have a client who develops some equipment with embedded web-servers that allow the end user to configure the device. The current interface for this doesn't match the bigger company 'Style Guide' and hence they've come to me to 'tart-it-up' substantially.
The problem is, that there is only 24K to fit in 7 web pages including JS, images and CSS. Plus the base firmware, only allows for HTML, ero, CSS and PNG, file formats.
Now, I've got most of the site done minus a few things, within this 24K but I really need to shave off as much data baggage as possible to give me capacity to include the images, and the final page. So literally every tiny Kb of data from a file is crucial.
I've done all the usual things like minification of all the files, but I'm still in need of trimming off more.
These has lead me to the following idea. Every page has the same footer:
<div class="footerContainer">
Copyright © <a href="http://url/"> Company</a> 2014. All rights reserved.
</div>
So I now want to place this in a separate html file and replace it with a single line of JS that then calls in the html snippet /.html file.
If the system allowed for external JS files I simply do a chunk of .js to replace a know div in the footer. But that's not possible. So, is there a way to write in JS, "insert external (html) file here"?
If this is concise enough it would at least trim off some of the size of each html page.
Key facts
24k max size
No JS files allowed or available
No external libraries
HTML minified already
Existing JS minified already
CSS minified already
No server side tech