Discussion:
Cloud Site Issue
Bryan Oliver
2018-08-14 20:45:39 UTC
Permalink
Hey Dirk,

I was attempting to play with the cloud.subsurface-divelog.org site today.
I manually entered a dive into the Mobile app and then processed a Manual
sync. It shows up without issue in the Desktop app, but has yet to show up
on the site. Do I need to run something else to get it to show up there?

Also thought I'd mention, web and web mobile are areas I can do a lot of
work on. So if we have any ideas for improving/adding to the cloud web page
I'd be happy to take on some of those challenges. I didn't see anything in
the github issues (granted I only looked for a brief time) so thought I'd
mention it here.

cheers,
Bryan
Bryan Oliver
2018-08-14 21:13:46 UTC
Permalink
Update, I just checked again and they are now showing up. I guess it just
took a while.
Post by Bryan Oliver
Hey Dirk,
I was attempting to play with the cloud.subsurface-divelog.org site
today. I manually entered a dive into the Mobile app and then processed a
Manual sync. It shows up without issue in the Desktop app, but has yet to
show up on the site. Do I need to run something else to get it to show up
there?
Also thought I'd mention, web and web mobile are areas I can do a lot of
work on. So if we have any ideas for improving/adding to the cloud web page
I'd be happy to take on some of those challenges. I didn't see anything in
the github issues (granted I only looked for a brief time) so thought I'd
mention it here.
cheers,
Bryan
Dirk Hohndel
2018-08-14 21:16:54 UTC
Permalink
Update, I just checked again and they are now showing up. I guess it just took a while.
That should happen fairly quickly
 usually faster than people are able to test. I wonder what delayed it.

One issue is that often browsers cache some of the files we modify - see below :-)
Hey Dirk,
I was attempting to play with the cloud.subsurface-divelog.org <http://cloud.subsurface-divelog.org/> site today. I manually entered a dive into the Mobile app and then processed a Manual sync. It shows up without issue in the Desktop app, but has yet to show up on the site. Do I need to run something else to get it to show up there?
Also thought I'd mention, web and web mobile are areas I can do a lot of work on. So if we have any ideas for improving/adding to the cloud web page I'd be happy to take on some of those challenges. I didn't see anything in the github issues (granted I only looked for a brief time) so thought I'd mention it here.
Are there ways to mark things on the server so that the browsers don’t cache the .js files that we send? Because that’s the #1 source of user problems - old versions of files in the browser cache.

There are many more areas where we would love to get help - your areas of expertise are a bit vague, can you provide some more background (if you don’t want to do that in public than personal email to me is fine, too).

Thanks

/D
Bryan Oliver
2018-08-15 00:22:00 UTC
Permalink
Post by Dirk Hohndel
That should happen fairly quickly
 usually faster than people are able to
test. I wonder what delayed it.
I think it was user error. When I sent the second email stating it worked,
I had tried it on my phone (and that was the first time I had requested it
from my phone, aka no cache). Then I went back to my desktop, and still no
dice until I cleared cache like you mentioned.

Are there ways to mark things on the server so that the browsers don’t
Post by Dirk Hohndel
cache the .js files that we send? Because that’s the #1 source of user
problems - old versions of files in the browser cache.
A pretty quick solution would be to configure the Apache server. We just
need to send the proper caching headers (specifically, we need apache to
send the *no-cache *header, the browser will handle the rest).

*One method to do so here:*

Add a .htaccess file to the root of the web directory, and add the
following:

<FilesMatch "^(list_lib|jquery.min)\.js$">
Header set Cache-Control "no-cache"
Header set Pragma "no-cache"
</FilesMatch>

To add more files to the caching rule, just add them in the parens above,
separated by a pipe.

If you want to do it for all of the files just use:

<FilesMatch "\.(html|js|css)$">
...
</FilesMatch>

Happy to discuss further or help implement on the server. My one concern
about the above approach is how does the stat.js file get created? Is it
made on request? Or is it updated in some sort of user directory each time
the server gets a cloud sync? If it's made on request, we'll just need to
make sure the response handler is also giving the no-cache header.


There are many more areas where we would love to get help - your areas of
Post by Dirk Hohndel
expertise are a bit vague, can you provide some more background (if you
don’t want to do that in public than personal email to me is fine, too).
I'll shoot you an email.

thanks,
Bryan
Post by Dirk Hohndel
Update, I just checked again and they are now showing up. I guess it just took a while.
That should happen fairly quickly
 usually faster than people are able to
test. I wonder what delayed it.
One issue is that often browsers cache some of the files we modify - see below :-)
Post by Bryan Oliver
Hey Dirk,
I was attempting to play with the cloud.subsurface-divelog.org site
today. I manually entered a dive into the Mobile app and then processed a
Manual sync. It shows up without issue in the Desktop app, but has yet to
show up on the site. Do I need to run something else to get it to show up
there?
Also thought I'd mention, web and web mobile are areas I can do a lot of
work on. So if we have any ideas for improving/adding to the cloud web page
I'd be happy to take on some of those challenges. I didn't see anything in
the github issues (granted I only looked for a brief time) so thought I'd
mention it here.
Are there ways to mark things on the server so that the browsers don’t
cache the .js files that we send? Because that’s the #1 source of user
problems - old versions of files in the browser cache.
There are many more areas where we would love to get help - your areas of
expertise are a bit vague, can you provide some more background (if you
don’t want to do that in public than personal email to me is fine, too).
Thanks
/D
Dirk Hohndel
2018-08-15 01:51:15 UTC
Permalink
Post by Dirk Hohndel
That should happen fairly quickly
 usually faster than people are able to test. I wonder what delayed it.
I think it was user error. When I sent the second email stating it worked, I had tried it on my phone (and that was the first time I had requested it from my phone, aka no cache). Then I went back to my desktop, and still no dice until I cleared cache like you mentioned.
Ah, ok. That explains it and makes me feel better.
Post by Dirk Hohndel
Are there ways to mark things on the server so that the browsers don’t cache the .js files that we send? Because that’s the #1 source of user problems - old versions of files in the browser cache.
A pretty quick solution would be to configure the Apache server. We just need to send the proper caching headers (specifically, we need apache to send the no-cache header, the browser will handle the rest).
<FilesMatch "^(list_lib|jquery.min)\.js$">
Header set Cache-Control "no-cache"
Header set Pragma "no-cache"
</FilesMatch>
To add more files to the caching rule, just add them in the parens above, separated by a pipe.
<FilesMatch "\.(html|js|css)$">
...
</FilesMatch>
Happy to discuss further or help implement on the server. My one concern about the above approach is how does the stat.js file get created? Is it made on request? Or is it updated in some sort of user directory each time the server gets a cloud sync? If it's made on request, we'll just need to make sure the response handler is also giving the no-cache header.
The files are created on every push to a user's repo, but are otherwise static.
I'll try your suggestion. Thanks.
Post by Dirk Hohndel
There are many more areas where we would love to get help - your areas of expertise are a bit vague, can you provide some more background (if you don’t want to do that in public than personal email to me is fine, too).
I'll shoot you an email.
Great!

/D
Peter Zaal
2018-08-15 05:16:33 UTC
Permalink
Post by Dirk Hohndel
Are there ways to mark things on the server so that the browsers don’t
Post by Dirk Hohndel
cache the .js files that we send? Because that’s the #1 source of user
problems - old versions of files in the browser cache.
A pretty quick solution would be to configure the Apache server. We just
need to send the proper caching headers (specifically, we need apache to
send the *no-cache *header, the browser will handle the rest).
*One method to do so here:*
<FilesMatch "^(list_lib|jquery.min)\.js$">
Header set Cache-Control "no-cache"
Header set Pragma "no-cache"
</FilesMatch>
To add more files to the caching rule, just add them in the parens above,
separated by a pipe.
<FilesMatch "\.(html|js|css)$">
...
</FilesMatch>
Happy to discuss further or help implement on the server. My one concern
about the above approach is how does the stat.js file get created? Is it
made on request? Or is it updated in some sort of user directory each time
the server gets a cloud sync? If it's made on request, we'll just need to
make sure the response handler is also giving the no-cache header.
The files are created on every push to a user's repo, but are otherwise static.
Just to mention another solution is to add a query parameter with a random
value at the url, e.g. ....\myscript.js?t=<random number>
Either with an random number for every request, or have the number changed
only with every update of the script. The latter is the best since this
will allow the browser to get the script only the first time and use it
from cache the next times.

Peter

Loading...