Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Content is intermittently loading not always

Avatar

Avatar
Validate 1
Level 1
pankajg1611582
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
pankajg1611582
Level 1

Likes

2 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
pankajg1611582
Level 1

16-07-2019

I have one page hosted on one of my AEM server [0] and from another AEM server [1], I am getting this page in IFRAME. Issue is sometimes [0] gets loaded in [1] and sometimes not and shows CORS origin policy error. I am not getting this, if it is related to CORS Policy configuration, then why its not occurring always?

One thing which i noticed that When Page is loaded successfully, response header looks like this:

Accept-Ranges: bytes

Connection: Keep-Alive

Content-Length: 72090

Content-Type: text/html; charset=UTF-8

Date: Tue, 16 Jul 2019 16:50:46 GMT

ETag: "1199a-58dce3e14d28a"

Keep-Alive: timeout=60, max=100000

Last-Modified: Tue, 16 Jul 2019 15:43:47 GMT

Server: Apache/2.4.29 (Red Hat) OpenSSL/1.0.2k-fips Communique/4.2.2

And when it does not get load, it looks like:

Connection: Keep-Alive

Content-Type: text/html;charset=utf-8

Date: Tue, 16 Jul 2019 16:50:30 GMT

Keep-Alive: timeout=60, max=100000

Server: Apache/2.4.29 (Red Hat) OpenSSL/1.0.2k-fips Communique/4.2.2

Transfer-Encoding: chunked

X-Content-Type-Options: nosniff

X-Frame-Options: SAMEORIGIN

[0]: https://www.cornerstones4care.com/get-real/sign-up.html

[1]: https://www.getrealaboutdiabetes.com/sign-up-for-diabetes-tips.html

You can check, in [1] there is iframe which is loading [0].

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,111 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,111 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

16-07-2019

I guess that the difference comes from the fact, that the page might be cached or not. And some instance (probably AEM) does provide proper CORS headers, and if it's just delivered from dispatcher cache, these headers are not added properly. Can you validate my assumption?

If that's correct, you need to configure the dispatcher/webserver to add these headers.

Jörg

Answers (2)

Answers (2)

Avatar

Avatar
Give Back 5
Level 3
anujg3325839
Level 3

Likes

27 likes

Total Posts

26 posts

Correct Reply

8 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Level 3
anujg3325839
Level 3

Likes

27 likes

Total Posts

26 posts

Correct Reply

8 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
anujg3325839
Level 3

16-07-2019

You can try to bypass dispatcher and try to use/load the pages directly to isolate the scenario.

Avatar

Avatar
Give Back 5
Level 4
joeb21688728
Level 4

Likes

33 likes

Total Posts

60 posts

Correct Reply

8 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Level 4
joeb21688728
Level 4

Likes

33 likes

Total Posts

60 posts

Correct Reply

8 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
joeb21688728
Level 4

16-07-2019

Why do you have different pages being served from different AEM instances? For an AEM implementation, the best practice is for pages to be served from the same PUB instance.