Quickest way of correcting just one detail

Sorry if this has been asked before, but I couldn’t find it:
On a quite large website I have an address list, which is the only page that would change from time to time. The other pages stay the same, new ones are added.
What is the easiest/quickest way to just change a phone number or a street name? When I publish to disk all the files are updated to the current date even when nothing changed other than a phone number in the address list.

1 Like

Hi @chrisMF, welcome.

This is a common question, and it’s often confusing what or why Sparkle does what it does.

So first, the biggest misconception is that the goal is to optimize publishing time. A website is (hopefully) extremely asymmetric in its usage pattern: it will be published far fewer times than it will be visited, so it makes sense that the primary goal is viewing performance and viewing correctness/consistency.

Publish performance is optimized in Sparkle, but only as a secondary goal, once viewing performance is attained.

So with that in mind, we spent many engineering hours figuring out how to make publishing fast, but even more figuring out how the published site would work with browser caches and server caches.

This is what we ended up with:

  • there’s a single CSS file for all pages, because once it’s downloaded browsers will cache it for a while (or forever), for all pages of the site; the CSS filename has a timestamp so that a new publish will produce a newer fresh filename
  • the timestamp in the filename (for CSS and javascript files) acts as a “cache buster”, or in other words it will cause browsers to re-download it when a new page is published; there are other ways to implement this but this is the most robust way to ensure no cache along the way will regurgitate an outdated version
  • the HTML files reference the CSS and javascript filenames, and since those change, the HTML file changes as well
  • image files (which are the bulk of a website upload), are only re-generated when they are changed in Sparkle (or more rarely when we make algorithmic changes to how they are generated)
  • critically, when a file is unchanged in Sparkle it’s also not touched on disk

This setup has many wins:

  • it plays well with differently configured servers, from the perfect .htaccess with expiry times for different file types, to the unconfigured deafult
  • it doesn’t retransfer the bulk of the files on each publish
  • it plays well with browser caches, which will consistently reference a single version of your site, be it the latest, or an older cached version, all trickling down from the HTML file
  • for when you export to disk, it plays well with file sync features of FTP apps

So ultimately yes, changing a single word in your project file is the worst case scenario, and will result in all of the text files in the site being transferred again, but then again this is small amount of data and a small price to pay.

Hope this helps.


Thanks Duncan for your quick and very helpful explanation. Coming from Dreamweaver I didn’t know why and how things work in Sparkle, but now … thanks!

Am I assuming correctly that there is no upload time difference if I upload directly out of Sparkle or make the detour and upload with Transmit (I like the idea of having a full backup version saved on my disk).

1 Like

Transmit is probably going to be faster because it isn’t also generating the site content at the same time. If you add the Sparkle export time to the Transmit sync time then Sparkle generally comes up ahead.

Sparkle mixes publishing with content generation, and the slowest part which is image compression.

Sparkle also has the knowledge of what the different files mean, so it doesn’t blindly upload files, but it uploads them in a sequence that ensures minimal site downtime. A random upload order isn’t necessarily too disruptive, but if say it changes an html file before having uploaded the corresponding css and javascript files, the site will be broken for a short time.

Finally the built-in publishing is obviously more practical as it’s one click.


Thanks Duncan,I appreciate your immediate and to the point explanations very much!

I like these little thoughtful features in Sparkle where you have coded it to minimise site downtime.

1 Like

Can Sparkle navigate updating via connecting via Amazon S3?

At present I am exporting to disk, then using Transmit to log in using an access key and a password. Then navigating to Cloudfront where I select one of many websites my brother and I have and using the synchronize function to locate and de-select the humongous Sparkle site file and then upload all the remaining updated files. Is there some way to do something that achieves the same or similar results?

Oh! And after uploading the site files, I have the “privilege” of separately creating what Amazon calls an invalidation which forces it to erase copies of the site (or portions of the site’s files) at its many sub-servers around the world.
This is done so (and others) can see the updated files immediately. Without doing an invalidation Id have to wait for Amazon’s periodic updating of such distributed copies of files.
So that would be another nice thing to have Sparkle be able to do if and when it is able to update directly using Sparkle.

There are many content delivery networks out there. AWS is one of the more complex ones in terms of their security model and general roadblocks, also not the cheapest.

If you have specific reasons to use AWS that’s cool. I think what can solve the problem for you is writing a script with an AWS library and take care of the whole process.

Otherwise there are alternatives that not only require zero integration effort, they are also free or very inexpensive. For example CloudFlare.

Right now we don’t plan on supporting S3 in Sparkle directly.

I’m not surprised the AWS maze isn’t part of Sparkle…I just follow the old saying, “If you don’t ask, you don’t get.”

My website tags along with my brother’s chosen server for his websites.
He recently moved us both to AWS and for me it is free (so far).
And aside from the ridiculously long passwords it isn’t really any more work than when we were using a regular server company.

Does the [website].sparkle file always have to reside in the folder with all the other files and folders (html, CSS, images, js)?
I ask because the biggest pain is to have to simulate a sync and then go down the list of new files and de-select the .sparkle file before uploading via Transmit. I don’t upload the .sparkle file because it can get huge…one of them is over 60 Mb.

I see CloudFlare has free websites but with a 3 page limit. Nice of them to do that, but too small for me.

Use an Apache server for hosting our clients websites and it is easy, fast, and with no hitches to speak of. I just hit the Publish button on Sparkle and done! Well ok, I do check everything online afterwards!

I keep my Sparkle file locally and not on the hosting server. I also don’t have my local Sparkle file in the folder that my generated website sits in, but then it is rare that I save my generated website (html/css/javascript) to my local drive.

No you don’t need to store the .sparkle file along with the export files. In fact the .sparkle file is no use on the web, you probably shouldn’t.

I wasn’t aware that CloudFlare had lowered their free tier, used to be unlimited pages and traffic.

The ridiculously long passwords are nothing compared to the APIs, in AWS. Not fun to work with and not widespread enough for regular hosting to consider.

I realize I am probably asking the same question again here but I want to be sure this is clear about how to organize my files for several different web sites.
It is OK to store the .sparkle file in one location and to store all the export files in a completely separate folder?
So for instance I could have one folder where I keep all my .sparkle files, and then a bunch of separate folders each containing the export for upload files (each folder for one website)?

Yes that’s correct, that will work fine.