Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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