Galleria not loading on initial page visit

我只是一个虾纸丫 提交于 2019-12-25 01:07:38

问题


I'm using the Galleria plug-in for a website I'm setting up, and it was working flawlessly until I tested it on someone else's computer.

On a visitors initial visit to the site, the slideshow will not load at all, but after reloading the page it will appear. I never had a problem with it while I was building the site, but when I cleared my cache and data and visited the site, I ran into the same problem.

So whats going on here? Is there a simple fix? Is there a way to just force a page reload upon the initial visit?

here is the site

On the home page, the first visit (no cache/data/cookies from the site previously) consistently loads without the Galleria plug-in slideshow playing. But after one reload, it works beautifully. Any help is appreciated.

Don't criticize too much, this is the first site I've made, and it was mostly made through sticking other people's code together.


回答1:


There's a javascript error (using safari web inspector) the first time the page is visited "Error: Fatal error: No theme found./galleria/src/galleria.js:3710" as mentioned here: jQuery Galleria 'fatal error: no theme found.' in IE

I would eliminate that error first and see if it still happens?




回答2:


I was seeing the exact same behavior. What fixed it for me was loading the css theme in the html head:

<link rel="stylesheet" type="text/css" href="galleria/themes/classic/galleria.classic.css"> 


来源:https://stackoverflow.com/questions/5071822/galleria-not-loading-on-initial-page-visit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!