Is a full html page needed when loading a page with jQuery mobile? -


i looking @ jquery mobile , system of loading web pages xmlhttprequest. possible automatically perform transition animations between 2 pages, instance.

however, not clear me. if understand correctly, each new page of jquery mobile powered website injected in dom of initial web page. documentation of jquery mobile tells because of mechanism, <title> tag of new webpages not taken account.

so, in way, if initial webpage a.html loads page b.html, tend think webpage b.html not need have full html grammar <html>, <head> or <body> tags.

my page b.html directly begin <div> element.

am right?
is full html page needed when loading html page jquery mobile?
what pros , cons having webpage wrong/truncated html syntax (appart page should not accessed directly through main page)?

but happens when user starts off on a.html, goes b.html, , refreshes page? jquery mobile uses pushstate plugin updates url if user had gone b.html page normally. means if user refreshes on b.html, there won't proper includes create mobile site if it's not full document.

my recommendation include jquery mobile js/css files in each document, include jquery core js file in each document, , include external custom js/css files holds necessary js , css site. way no matter page in site user accesses, include necessary information. doesn't add whole lot of bloat site, few lines of includes per page. of time of includes ignored when jquery mobile pulls page dom via ajax (jquery mobile grabs first data-role="page" element , it's contents, else in document ignored).

long story short:

the performance benefit omitting proper html structure each document not worth possibly breaking user's experience common occurrences such refreshing page (which happens automatically on many devices when user opens browser open page).

a major con not using valid html structure you're hurting seo. meta tags in <head> of documents should still unique content in page, search engine crawlers can index site.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -