Solved

Get a certain webpage to load everytime and ignore previous cache settings

Posted on 2016-09-28
7
69 Views
Last Modified: 2016-11-03
Hi There

I am doing a website for a client and part of it requires that the visitor is displayed a list of the nearest locations. This involves the use of the geo-locate function. Most browsers (desktop or mobile) require that the user select "Allow" or "Deny". Which is perfect. But if someone presses Deny just the once, then they do not get asked the question again.

What we would like to do is disregard the cache on the page every time they visit. By all means let them choose again if they wish to share their location or not. But we need to give them the option to decide everytime.

Our scripting guy is saying that they cannot use the no-cache no-store function to achieve this and there is no other way to do it so we just have to forget about it. I find this difficult to believe. There must be some way to either disregard a pages cache on load or to force the permission to be asked everytime.

Any suggestions?
0
Comment
Question by:doey
  • 3
  • 2
  • 2
7 Comments
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41820449
Google provides an article dedicated to helping you get the users' location: https://developers.google.com/web/fundamentals/native-hardware/user-location/user-consent?hl=en

It sounds like, depending on browser behaviour which is beyond the control of the developer, you may only get to request the location once per domain, which is why Google is saying above how important it is to not just request it on loading the landing page of the site.
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41820497
It is possible to detect when the user has declined to provide their location, in which case the best thing you can do is to link to instructions which tells them how to adjust browser settings to re-enable it.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41820504
I almost always click on Deny when I get those requests.  On the one site I did with Google Maps, we asked for the users location to display the closest locations and did not use the browser geo-location.  I don't think you can force the browsers the way you want.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:doey
ID: 41822294
Hi Dave

You say that on a particular website you "asked for the users location to display the closest locations and did not use the browser geo-location." Do you mean that you physically asked for them to type in their location?
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 41822355
Yes, it's a form that let's them enter their address and returns a Google map with the locations nearest them.  It's on this page:  http://www.darkhorsecrankworks.com/dealer.html
0
 

Author Closing Comment

by:doey
ID: 41871962
Although my solution required a different approach, this led me in the right direction.

Thanks Dave
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41872416
You're welcome, glad to help.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now