I use jQuery to update and load search results and the page navigation at the bottom of the page. I have a jQuery slider and several HTML-Forms with checkboxes, for each of those elements I set a cookie (on change), and use .load() to load the content from load_search.php, which works very well in all browsers.
Now I use the same method to upload the page navigation, and I get very weird results. In the search.php, the jQuery code is:
// PAGE NAVIGATION //
$('#page_navigation').on("click", ".page_no_item" , function(event) {
var id = (event.target.id);
$.cookie("cur_page_no", id);
search_results_load();
page_navigation_load();
alert($.cookie("cur_page_no")); // -> returns the right cookie value
});
also, I check the value on document ready, to be sure:
$(document).ready(function() {
alert($.cookie("cur_page_no")); // -> also returns the right cookie value
});
In the .php file that I load, in no-webkit browsers, $_COOKIE['cur_page_no'] returns the right value, just in webkit browsers, it always returns 1 (which I put as Standard, if the Cookie is empty or not set). var_dump() returns always string(1) "1" in webkit browsers.
Note: I have tried to run it not on localhost, but the problem remains. Please also note, that I use the exactly same way to read the other cookies (e.g. for the checkboxes which are checked) and they return the right value.
Any ideas or hints are highly appreciated! Thank you very much in advance!! :)
Notethingies :) Could you check in the developers console (F12) yourResources -> Cookiestab, if it exists in there?