简体   繁体   English

如何更改图片加载顺序(适用于Lightbox)

[英]How to change Image Loading Order (for Lightbox)

I've got a page with a lot of images (thumbnails). 我的页面上有很多图像(缩略图)。 You should be able to expand the images via Lightbox. 您应该能够通过Lightbox展开图像。 I need to encourage the browser to load the image in the Lightbox before any other image (thumbnail). 我需要鼓励浏览器先在灯箱中加载图片,然后再加载其他图片(缩略图)。

I remember some articles (I can't find anymore) on how to influence the loading mechanism of the browser (use a different subdomain to allow another thread), but I'd like to know whether there might be other options (ie without additional subdomains). 我记得一些文章(我找不到了)关于如何影响浏览器的加载机制(使用不同的子域来允许另一个线程),但是我想知道是否可能有其他选择(即,没有其他选择)子域)。

To clarify the issue: 为了澄清这个问题:

Example (how I'd like it to behave) 示例(我希望它如何表现)

  • I visit the page 我访问页面
  • I click on the 3rd picture thumbnail 我点击第三张图片缩略图
  • The 3rd picture is shown (while the remaining thumbnails are loading) 显示第三张照片(正在加载其余缩略图)

Example (how it behaves right now) 示例(目前的行为方式)

  • I visit the page 我访问页面
  • I click on the 3rd picture thumbnail 我点击第三张图片缩略图
  • A spinning wheel is shown until all thumbnails are loaded 直到所有缩略图都加载完毕,才会显示一个手纺车
  • The 3rd picture is shown 显示第三张图片

Are there any tutorials/papers/views on this issue? 有没有关于这个问题的教程/论文/观点?

只是在我的自定义队列管理器中使用jQuery $('<img>').attr('src', ...) ,它限制了浏览器以1比1的方式加载图像,因此可以加载其他图像页面上可能显示的图像(例如灯箱中的图像)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM