|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
fabi1986 Smarty n00b
Joined: 24 Mar 2012 Posts: 4
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Mar 24, 2012 11:31 pm Post subject: |
|
|
javascript läuft auf dem client im Browser. Das heißt der Output von news.js ist nicht in Smarty's cache. |
|
Back to top |
|
fabi1986 Smarty n00b
Joined: 24 Mar 2012 Posts: 4
|
Posted: Mon Mar 26, 2012 3:59 pm Post subject: |
|
|
das problem ist aber das smarty da immer eine neue Zahl hinter das ? macht, wie kann ich das vermeiden? |
|
Back to top |
|
fabi1986 Smarty n00b
Joined: 24 Mar 2012 Posts: 4
|
Posted: Mon Mar 26, 2012 7:57 pm Post subject: |
|
|
ok das problem liegt nicht an smarty sondern an ajax |
|
Back to top |
|
fabi1986 Smarty n00b
Joined: 24 Mar 2012 Posts: 4
|
Posted: Tue Mar 27, 2012 4:17 pm Post subject: |
|
|
habe das Problem jetzt gelöst, falls noch jemand das selbe Problem hat hier die Lösung:
Code: |
$.ajaxSetup({ cache: true });
$.ajax({
url : "index.php"+url,
type : "POST",
cache : true,
dataType : "html",
data : "LoadContent=true",
success : function(data) {
$("#loaded_content").html(data);
$("#loaded_content").css('visibility','');
}
}); |
und zwar muss man mit $.ajaxSetup({ cache: true }); den cache aktivieren nur so wird keine timestamp an die .js Datei gehängt
Grüße Fabi |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|