Loading HTML from a text file is a useful way to get a better performance with the jQuery's load()
method. Given a simple text file that contains the following line:
<h1>Test</h1>
we can easily load its content into a target element with a simple jQuery statement:
$(document).ready(function() { $('#test').load('test.txt'); });
You can see that test here. By doing so, we avoid HTML parsing while retrieving a given resource.