HTML Path referenced in Javascript - How does AEM resolve it? | Community
Skip to main content
blkhatpersian
November 19, 2016
Solved

HTML Path referenced in Javascript - How does AEM resolve it?

  • November 19, 2016
  • 1 reply
  • 771 views

Hi everyone,

I am running into an issue incorporating an existing site into AEM, specifically with Javascript. I have created a client library and it contains a Javascript file that has the following:

"var e="assets/panels.html #"

How does AEM resolve this Javascript? In other words, is it trying to find the file from the var directory where the minified client library is being served? Or somewhere else?

I created a Page called "panels" at the following path:  /content/aoswh3/bth/panels. When I replaced the path in the JS above to that, it did not appear to work and I saw no Javascript errors in the console.

Any ideas?

Thank you,
Ali

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Peter_Puzanovs

As per AEM standard practice you do not try to load resources from /var folder. Normally, content get's served either from /content or /etc folders.

1) Your website runs from browser or any REST interface

2) Your AEM webserver serves your browser CSS,JS(both loaded from client lib) and HTML.

3) Your browser loads these resources and tries it's best to render them as best as it can.

To your question, with the "var e="assets/panels.html #". It most likely depends on what you are instruct your browser to do with your javascript.

Regards,

Peter

1 reply

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
November 20, 2016

As per AEM standard practice you do not try to load resources from /var folder. Normally, content get's served either from /content or /etc folders.

1) Your website runs from browser or any REST interface

2) Your AEM webserver serves your browser CSS,JS(both loaded from client lib) and HTML.

3) Your browser loads these resources and tries it's best to render them as best as it can.

To your question, with the "var e="assets/panels.html #". It most likely depends on what you are instruct your browser to do with your javascript.

Regards,

Peter