help set ajax cookie
5 posters
Page 1 of 1
help set ajax cookie
I have a code, I need to set a cookie for 30 minutes please help me
- Code:
$(document).ready(function() {
$("#newtopic").load("/f1- .ipbtable tbody tr .topictitle:lt(10)");
});
Re: help set ajax cookie
@infotmt
The topic was posted in the wrong section, so I have moved it to the correct section.
|
Re: help set ajax cookie
Dear @infotmt
are you sure you are talking about cookies? Maybe you are referring to "cache", so that the result is stored in cache and not loaded every time? (in order to have a faster load on your website)
Have a nice day
are you sure you are talking about cookies? Maybe you are referring to "cache", so that the result is stored in cache and not loaded every time? (in order to have a faster load on your website)
Have a nice day
infotmt likes this post
Re: help set ajax cookie
you are right, please help meNiko wrote:Dear @infotmt
are you sure you are talking about cookies? Maybe you are referring to "cache", so that the result is stored in cache and not loaded every time? (in order to have a faster load on your website)
Have a nice day
Re: help set ajax cookie
@infotmt,
Your topic is not clear enough. Please provide us with some more details as to what this code will do and maybe a screenshot with it.
TC.
Your topic is not clear enough. Please provide us with some more details as to what this code will do and maybe a screenshot with it.
TC.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
infotmt likes this post
Re: help set ajax cookie
@infotmt Here I am
I needed to change the script you provided because sadly in jQuery the function
does not directly have cache support. For this reason we will turn this into
Go to ACP > Modules > HTML & Javascript > Javascript codes management and create a new javascript with these settings, upon having verified that Javascript management is enabled:
I needed to change the script you provided because sadly in jQuery the function
|
|
Go to ACP > Modules > HTML & Javascript > Javascript codes management and create a new javascript with these settings, upon having verified that Javascript management is enabled:
- Title: as you prefer
- Where: in all pages (or in any case where the
element is)- Code:
#newtopic
- Code:
- Code:
$(function() {
var element = $("#newtopic");
var targetPage = '/f1-';
$.ajax({
url: targetPage,
cache: true,
type:'GET',
success: function(data){
var retrieveContent = $(data).find('.topictitle:lt(10)').html();
$(element).html(retrieveContent);
}
});
});
Ape likes this post
Similar topics
» .ajax() vs .get() -> get = 1 request and ajax = 2 requests???!!!
» Ajax or Json and Jquery
» Jquery Cookie Problem
» CNIL cookie banner
» Ajax response html
» Ajax or Json and Jquery
» Jquery Cookie Problem
» CNIL cookie banner
» Ajax response html
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum