Monday, June 8, 2015

6/8/15 - LibriFox Not Well Formed

Now that I don't have to work on NotesDemo anymore (the talk went well, I'll try to write a reflection post on it), I'm back to LibriFox. I did some research on the not well formed error we get every time a new page is loaded. I'm not 100% sure, but it seems like this problem is related to another problem that pops up in certain cases: mismatched tag. Expected: </link>. A link tag with no closing is 100% valid html, whereas including a </link> tag would actually be invalid html.

These two errors are both related to how jQuery mobile loads new pages. It uses an ajax request to dynamically load the body of the requested page into the original page. Interestingly enough, it doesn't load anything in the <head> of the new page, because it assumes that it will be loading the same scripts that have already been included in the original <head>, and so it just ignores the new one completely.

Because we are loading ajax from the local file system instead of from a server, it seems like the problem is that the local files don't have the proper HTML headers, and so the loader is treating them like x(h)thml, even though all the pages have a <!DOCTYPE html> as the first line. This is very annoying, but it doesn't seem like there's anything I can really do about it without hosting the app on a webserver.

No comments:

Post a Comment