Return to Project-GC

Welcome to Project-GC Q&A. Ask questions and get answers from other Project-GC users.

If you get a good answer, click the checkbox on the left to select it as the best answer.

Upvote answers or questions that have helped you.

If you don't get clear answers, edit your question to make it clearer.

0 votes
386 views

Trying to make statistics.

Old old(-er_ statistics map was http://maxcdn.project-gc.com/images/ps_map.php?mapHash=25917b3956abe52c3d494768fa26c7ea

new map is

//cdn2.project-gc.com/dimages/ps_map.php?mapHash=51673fa187c904ba722cb6b34e369fa9

Why is the http: missing on the img link?

in Bug reports by novw.nl (140 points)

1 Answer

+1 vote
The links without http or https are perfectly valid and follow what protocol is currently used by a browser (either http or https, but I believe https is already used everywhere). But not all the tools support that, for example this QA breaks the link.

Maps on your profile stats work as expected:

https://project-gc.com/ProfileStats/novw.nl#Maps

As well as the link to the specific map now (after loading the profile stats page):

https://cdn2.project-gc.com/dimages/ps_map.php?mapHash=38b957c1dc770681d579f19c67b6d11b

But I assume if you access the link directly without the statistics, it is not generated for you and therefore it returns error.

Please, do not use the separate images in your statistics, as they are "implementation detail" and might change or disappear without any notice.
by Jakuje (Moderator) (117k points)
Maybe I was unclear. After the statistics have been generated there is an option to "download static html", so the stats can be used on (my) own server.

There are 1323 (!) occurences of <img src="//cdn2.project-gc.com/..., which is _not_  a valid protocol. Valid protocol would be <img src=http://cdn2.project-gc.com/... (or https)

There are also 154 occurences of "http://project-gc.com//cdn2.project-gc.com/". Also not a valid protocol.

Again, this is when downloading static html to be used on an other site than project-gc. When the HTML is uploaded to your gc-profile, it also show NO pictures, because the links are non-valid.

It a simple typo, and can be easily solved with a find/replace on the users side, but its not "nice"...
The double slash is NOT a typo. It is functionality over 20 years old: https://stackoverflow.com/a/9632363/2196426

But indeed, it should not be present in the static downloaded files.
The double slash is used to point to root of server as far as I know. If I paste the stats on geocaching.com, in this case the double slash points to http://geocaching.com//cdn2.project-gc.com/ . And I _think_  there is no cdn2 folder at geocaching server, since the *domain* of the link is project-gc.com . In other words, if you paste the static html into your geocaching profile page and you have not created the maps before (ie visitors who look at the stats page) , no maps (and other pics) will show. Let alone if I paste the stats on my own server.

Either that, or project-gc is hosted on the same servers as geocaching...

(again, its a simple find/replace on my side to fix it, but its not nice :)  )
No. The double slash does not point to the root of the server. Please, read the link I posted and the referenced RFC. The problem is in geocaching, that it translates the links to the root of server (root of server is single slash).
...