简体   繁体   中英

What Internet Explorer settings might affect SQL queries functioning differently?

Vague title, but it's tricky to word well in one question.

I have a site which uses a local database to store reviews, and in another table we store ratings of those reviews, so every time someone clicks a thumbs up / thumbs down icon next to a review a new entry is added to that table, much like the "is this review helpful?" feature you see on many sites.

This is done using a js function which triggered when either thumb is clicked on, which then calls an aspx page and in the C# behind we check if the user has already voted on that review, and if so to update the database appropriately (eg removing their vote if they have already voted in that direction).

This works well in Chrome and IE on the laptop I am working on. I have tried the latest IE 10 standards as well as IE 8 standards as the latter is what most people will be seeing the site with, but it partly doesn't work on someone else's computer with the same browser version installed and same standards set. I had this user log in to the site on my machine to see if it was a user account issue, but it worked fine for them on my machine.

I have tried loading the site in InPrivate browsing windows to prevent any caching affecting the issue.

It works for them to submit a vote, either up or down, and they can change their vote from up to down, and the database is updated correctly. If they try to remove their vote however, it simply doesn't work.

It's not a user issue, as it works fine for both of us on my machine, and for neither of us on their machine, so I figure it some browser setting of some kind.

Summary: - Works in Chrome - Works fully in IE on one computer - Doesn't work fully in same IE on another computer

Any pointers?

Caching issue. This explains why the database was updated the first time, but each time after it wouldn't work properly. Using the code below to prevent caching:

    // Stop Caching in IE
    Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);

    // Stop Caching in Firefox
    Response.Cache.SetNoStore();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM