0
votes

Our site runs through Netscaler and we have the Lazy-loading of images activated. I'm trying to understand it's functionality and if it can be controlled in any way. For instance if specific images can be set to not lazy-load. But I can't find anything on the specific implementation of it, just articles describing how to activate it.

If I understand it correctly it works like classic js-based lazyloading by converting imagetags by adding the class lazy and moving the src to data-original attribute. Then a javascript puts the correct src back when scrolled into view. But on what implementation is it based? Tried searching all loaded sources on lazy but can't find anything specific that seems to be connected to this behaviour.

Does anyone know how the Nestcaler lazy-loading is implemented and if there are ways to control it?

1

1 Answers

0
votes

I suppose you are using Front End optimization feature, from https://docs.citrix.com/en-us/netscaler/12/optimization/front-end-optimization.html it will do the following:

JPEG optimization, CSS image inlining, Image shrink-to attributes, GIF to PNG conversion, HTML image inlining, WebP image conversion, JPEG, GIF, PNG to JPEG-XR image conversion

You can control the policies that have the lazyload option by using expressions on said policies. For instance, you only want to apply lazy load on images from https://www.yourwebsite.com/images/ folder. You would use a policy like this:

HTTP.REQ.URL.CONTAINS("images/")

and then create and action to only use lazy load

add feo action lazyloadaction 0 -imgLazyLoad