Saving pages to global scope