Select to view content in your preferred language

Lazy loading in Enterprise Sites causes HTML anchors to work incorrectly on long pages

1212
4
04-12-2021 12:20 AM
StefanUseldinger
Frequent Contributor

After upgrading from Enterprise 10.6.1. to 10.8.1 I noticed the lazy loading behavior on our Enterprise Sites.

More information on this can be found in this article: http://tomwayson.com/2018/05/01/arcgis-hub-goes-esri-loader-performance-wins-and-lessons-learned/

While we use Hyperlinks with local anchors, we see that the user cannot jump to the correct anchor position. On long pages, the browser jumps to an earlier position. I suppose, that the lazy loading mechanism is the cause.

Does anybody have any experience with this issue or a possible workaround?

4 Replies
by Anonymous User
Not applicable

Do you have a publicly accessible site you could share or possibly some screenshots of your site? Anything you can provide will help us put together a reproducible case.

0 Kudos
StefanUseldinger
Frequent Contributor

The error occurred for example on this page: https://maps.vdl.lu/portal/apps/sites/#/topo/pages/vivre

However, as I modified the existent Esri code (1==+new URL(window.location).searchParams.get("noLazyImages")) in vendor-141ff78125c06b3ca9af4a092ea6ba71.js to disable lazy loading as a workaround, the issue cannot be reproduced on this page.

Nevertheless, the URL will give You a hint, how I used HTML anchors in the context of ArcGIS Enterprise Sites for reproducing the issue. The hyperlinks are embedded into the thumbnail images on top of the page. The HTML anchors (with the HTML class "anchor_h") are stored in the DOM element before the button with the label "VOIR CARTE". The error mainly occurred with the with the hyperlinks pointing to the anchors at the bottom of the page.

0 Kudos
StefanUseldinger
Frequent Contributor

Can you reproduce the issue?

0 Kudos
StefanUseldinger
Frequent Contributor
0 Kudos