From: Karl E. Peterson on
Tony Toews [MVP] wrote:
> "Karl E. Peterson" <karl(a)exmvps.org> wrote:
>
>>> Rather than downloading the entire file just to see if it's changed
>>> I'd just like to get the date/time and/or size of a file on an HTTP
>>> site.
>>
>>After reading this entire thread, I feel compelled to ask "for what purpose?" I'm
>>thinking there are almost certainly easier ways to accomplish your goal, which I
>>suspect is to decide whether or not to download an update. For example, you could
>>have a tiny "flag" file that contains the date/time/version of whatever the latest
>>is. This could be snatched, inspected, and acted upon with no changes at all in
>>your existing code.
>
> I'm already doing that for updates to my software. See
> http://autofeupdater.com/_download/currentversion.txt for what I've
> done there.

Yeah, there ya go. (I'd strip the formatting from the numerics, though, if you want
an easier time of coercing them back from strings to numbers.)

> This chunk of logic is for license key files which would be specific
> by client but might be 200 or 500 encrypted bytes long but there might
> be dozens or, if I'm fortunate, hundreds. So if the license key file
> changes for the particular user then I want to download it.
>
> Now granted 200 clients downloading a 500 byte file each day is only
> going to be a 100 Kb load on my server so maybe I shouldn't even be
> worrying myself about this. It's just that I like being efficient and
> economical with bytes.

So they'll be needing to hit your server every day, just to be sure they're
licensed? Yowsa. What if their pipe's down? Or (infinitely worse) yours?

Well, regardless, I think you've seen that determining the timestamp is going to
take that many bytes anyway. Probably easier to just grab the thing while you're
there if it's that small.
--
..NET: It's About Trust!
http://vfred.mvps.org


From: Nobody on
"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:OF4Az7XYKHA.3612(a)TK2MSFTNGP02.phx.gbl...
> Well, regardless, I think you've seen that determining the timestamp is
> going to take that many bytes anyway. Probably easier to just grab the
> thing while you're there if it's that small.

If the file changes everyday, then maybe. The header is 285 long, while the
text file is 134 bytes long. So when HEAD is used, 285 bytes are used, while
it's 419 bytes if GET is used, so using HEAD saves 32% bandwidth, assuming
updates are not frequent.


From: Karl E. Peterson on
Nobody wrote:
> "Karl E. Peterson" <karl(a)exmvps.org> wrote ...
>> Well, regardless, I think you've seen that determining the timestamp is
>> going to take that many bytes anyway. Probably easier to just grab the
>> thing while you're there if it's that small.
>
> If the file changes everyday, then maybe. The header is 285 long, while the
> text file is 134 bytes long. So when HEAD is used, 285 bytes are used, while
> it's 419 bytes if GET is used, so using HEAD saves 32% bandwidth, assuming
> updates are not frequent.

Yeah, but that's sorta like changing one lightbulb in a palace from incandescent to
CFL. Not sure it's payback would ever be noticed.
--
..NET: It's About Trust!
http://vfred.mvps.org


From: Tony Toews [MVP] on
"Karl E. Peterson" <karl(a)exmvps.org> wrote:

>Yeah, there ya go. (I'd strip the formatting from the numerics, though, if you want
>an easier time of coercing them back from strings to numbers.)

I was thinking that too when I just pasted that URL.

>> This chunk of logic is for license key files which would be specific
>> by client but might be 200 or 500 encrypted bytes long but there might
>> be dozens or, if I'm fortunate, hundreds. So if the license key file
>> changes for the particular user then I want to download it.
>>
>> Now granted 200 clients downloading a 500 byte file each day is only
>> going to be a 100 Kb load on my server so maybe I shouldn't even be
>> worrying myself about this. It's just that I like being efficient and
>> economical with bytes.
>
>So they'll be needing to hit your server every day, just to be sure they're
>licensed? Yowsa. What if their pipe's down? Or (infinitely worse) yours?

No. This is only for updates to the encrypted license file. The
file gets downloaded and resides in the same folder as the VB exe. I
plan on allowing for different modules each available for a fee. The
license file controls which module they are enabled for. So when
they send me money I email them a 9 digit randomish PIN which they
would enter on a form and which is recorded in the master INI file.
This then becomes part of the name of the license file on my web
server.

So if they decide to buy a second module I just update the license
file on my web server and tell them to check for updates.

>Well, regardless, I think you've seen that determining the timestamp is going to
>take that many bytes anyway. Probably easier to just grab the thing while you're
>there if it's that small.

Yup, that's what I'm thinking. If there are changes then I'll update
the file otherwise leave it alone.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: Tony Toews [MVP] on
"Nobody" <nobody(a)nobody.com> wrote:

>> Well, regardless, I think you've seen that determining the timestamp is
>> going to take that many bytes anyway. Probably easier to just grab the
>> thing while you're there if it's that small.
>
>If the file changes everyday, then maybe. The header is 285 long, while the
>text file is 134 bytes long. So when HEAD is used, 285 bytes are used, while
>it's 419 bytes if GET is used, so using HEAD saves 32% bandwidth, assuming
>updates are not frequent.

Ahh, so that 285 bytes is always downloaded whether it's a GET or
HEAD. Good to know.

See my reply to Karl for details of this portion of my logic. The 200
or 500 byte license file would get setup once. And likely wouldn't
change again for years if ever. In some extreme cases I can see it
changing 2 or 3 times in a year.

Mostly if the developer decides to buy one module at a time so the
individual price is under his authorization limits.

Tony

--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a free, convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11
Prev: Printing the Form
Next: Common Controls 5.0 / Windows 7