Note that there are some explanatory texts on larger screens.

plurals
  1. POXML, XSLT and JavaScript
    text
    copied!<p>I'm having some trouble figuring out how to make the "page load" architecture of a website.</p> <p>The basic idea is, that I would use XSLT to present it but instead of doing it the classic way with the XSL tags I would do it with JavaScript. Each link should therefore refer to a JavaScript function that would change the content and menus of the page.</p> <p>The reason why I want to do it this way, is having the option of letting JavaScript dynamically show each page using the data provided in the first, initial XML file instead of making a "complete" server request for the specific page, which simply has too many downsides.</p> <p>The basic problem of that is, that after having searched the web for a solution to access the "underlying" XML of the document with JavaScript, I only find solutions to access external XML files.</p> <p>I could of course just "print" all the XML data into a JavaScript array fully declared in the document header, but I believe this would be a very, very nasty solution. And ugly, for that matter.</p> <p>My questions therefore are: </p> <ul> <li>Is it even possible to do what I'm thinking of?</li> <li>Would it be SEO-friendly to have all the website pages' content loaded initially in the XML file?</li> </ul> <p>My alternative would be to dynamically load the specific page's content using AJAX on demand. However, I find it difficult to find a way that would be the least SEO-friendly. I can't imagine that a search engine would execute any JavaScript.</p> <p>I'm very sorry if this is unclear, but it's really freaking me out.<br> Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload