Page not loading properly

I uploaded the final site for my client on their server, but for some reason, the site doesn’t load properly.

Before it was uploaded to their server, I used a free hosting just to test the site and show previews to the cliente before uploading to the main domain. It always worked out great. Now that I’ve uploaded to their main domain, there are missing pictures all over the place.

You can see it works well here, but on the main domain, it doesn’t load properly.

Everything is loading OK here. I see from the page source that all images are present and correct. It may be a cache issue. Have you tried emptying your browser cache and reloading the page?

1 Like

Yes I’ve tried but no luck. I tried from another computer and it worked fine, but some devices load the site differently. By the way, my client can’t see it properly either.

It definitely sounds like a cache problem. The one thing you and your client have in common is that you’ve probably both been viewing the site before you made changes. Third parties who connect haven’t visited the site before so they will always see the clean, latest version. It may be worth deleting the full browser history, closing the browser and then opening again. That should clear the problem.

@gastonpm, Have you got an SSL Certificate against the domain? From this end you website is unsecured Also make sure you have all non “https” forced to load “https” via your cPanel.

1 Like

Definitely those who haven’t accessed before can view it with no problem at all. I’ve been able to make it work on my browser by deleting the cache, but somehow it didn’t work on my iPad. Is there anyway to solve this? I don’t want to be asking to everyone to delete their cache so they can view it with no issues.

I don’t think so. Sadly I don’t have access to the cPanel, they only gave me the FTP address, user and password. But if that were the problem, wouldn’t be every device affected? The issue I’m having is that in some devices the site loads great, and in others doesn’t.

The cache in most browsers will usually empty after a period of time, ranging from a few minutes to several days. It really depends on how often people use their browser. The caching is usually restricted by the amount of memory/disk space set aside for caching. Once this is exhausted, the browser will be forced to download the information again from the server. The only sure fire way to stop caching of your website is to use cache-busting techniques. This would involve making some changes to your website code and isn’t recommended. However, if that is something you feel will be important, there are plenty of online resources that explain how to force browsers to reload your pages.

1 Like

Great, thank you very much!

Just for future reference, you may be able to force browsers to reload your pages by simply editing the HTML file output by Sparkle. Somewhere in the head section will be a link to your css stylesheet. If you just add a random number preceded by a question mark, it will look like a version number and the page should reload because it’s different from the cached version. This is what it would look like:

In the above example, I’ve added ?1234 at the end of the css file name. This is usually sufficient to force a reload of the page. Obviously, if you make changes in the future, you would add a different number so that your changed page will reload.

It’s worked on a number of sites that I’ve upload and it seems to work in most browsers without detriment.

Awesome! That’s really helpful. In case I do that, I will have to export the site to my disk and then upload it manually to the FTP right?

Hello everyone :slightly_smiling_face:

According to the Sparkle documentation … the CSS file is “re-generated” (with a different name, containing the date and time) every time you publish the site.

So that should take care of the browser cache issue.

Quote:

The ‍main ‍html ‍file ‍for ‍each ‍page, ‍and ‍the ‍corresponding ‍javascript ‍and ‍css ‍files, ‍are ‍all ‍re-generated ‍every ‍time ‍the ‍site ‍is ‍published, ‍this ‍is ‍designed ‍to ‍work ‍with ‍server ‍and ‍browser ‍caches.

Found this information under “Publishing ‍performance” on this page:

https://sparkleapp.com/docs/exporting.html

I think this was discussed on this forum before, I’ll try to find it … otherwise I’m sure @duncan can help with more information.

1 Like

Some information from @duncan in this thread:

1 Like

Could you:

  • go to the Safari settings, advanced section
  • check the “show develop menu in menu bar”
  • open a page of your site that’s not loading properly
  • open “show javascript console” from the Safari develop menu
  • make the bottom pane tall enough to show all errors
  • post a screenshot of that

@gastonpm, You have https scattered throughout your website code so your website is conflicting because you have no SSL against the client’s domain name. Browser’s are not reacting in a standard way to this so I don’t believe this is a cache issue.

It isn’t an option nowadays but an absolute must! You are using Google Fonts, for example, and by default it is issuing “https”, not http.

I also think the server is a bit inconsistent - I have gotten a number of errors trying to load your site. Mostly timing out, or can’t connect to this server.
Did you add any extra code to your website?

As Duncan has asked, I see your site throwing a lot of javascript permission errors because of your non SSL Certificate compliance so my take is how things have been setup on the server and not Sparkle or the browser.

2 Likes

You need to get full access to the site’s Control Panel…then see if they offer a free SSL certificate you can implement.
One of the most popular and easiest to install is “Let’s Encrypt”. Usually a one click install.

Then you’ll need to “force SSL” in order to make all browsers do that. Some servers offer a one click install of this; others do not. If yours does not, you’ll have to upload a text file to the server using FTP software, a “.htaccess” file. Customize this for your domain in a plain text editor, save it, then upload it to the server. NOTE: You cannot save it with the “dot” prefix on your Mac; you must rename it with the dot-htaccess on the server once it’s uploaded there:

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://http://MyWebsite.com/$1 [R=301,L]

This is a bit of a pain but “no pain, no gain” as the saying goes.

Good luck!
Dave
macmancape@gmail.com

Actually the advice about ssl is incorrect right now. As @greenskin noted, corlasa.com doesn’t have a secure certificate, so adding the htaccess would only break it for everybody.

The issue is @gastonpm you seem to have entered https://corlasa.com as your website address in the general site settings, which Sparkle encodes in your page as the “canonical” address, so search engines will send visitors to that address which doesn’t work.

So you can either get a certificate for the domain and set up an .htaccess redirection (I’d suggest using this domain independent redirection), or you change the website address in Sparkle to just http://corlasa.com

But all this is conjecture, until you give more details about the what the “not loading properly” is about.

1 Like

Okay, thanks for the feedback. I’m not managing the server and the previous site didn’t have SSL either. This site hasn’t been updated for 9 years, so there might be some issues there.

Hi @duncan, thanks for reaching out. I’ll change the website address to http://corlasa.com to see if that solves it. I was able to fix it in Safari by emptying the cache but, for example, on my iPad or on Chrome it still doesn’t load properly. When I say that it doesn’t load properly, I mean there are missing images and sometimes menus (I say ‘sometimes’ because the website seems to be loading differently on each device, except on those who have an empty cache or never access de domain before which works fine).

I’ll attach Chrome screenshots with the console, where the site doesn’t load properly, and Safari screenshots with the console, where the site does load properly.

The problem is that I don’t have full access to the server control panel, so I’ll have to talk to the people who do. This site hasn’t been updated on 9 years and seems like it SSL certificate hasn’t been renewed in a while. Anyway, thanks for the advice!