Google Analytics İzleme

10 Ekim 2012

ASP.NET MVC 3 - Javascript veya Ajax işlerimlerinin Browser'da Geri tuşuna basınca çalışmama sorunu

Sayfanızda jquery document.ready fonksiyonlarınız varsa Firefox'da çalışmamaktadır.
Aynı şekilde ajax işlerimlerinde de tüm browser'larda geri tuşuna basınca tekrar tetiklenmemektedir.

Bu tip sorunlara engel olmak için


[OutputCache(NoStore = true, Duration = 0, VaryByParam = "None", Location = OutputCacheLocation.None)] 
public partial class ApplicationController : Controller
{
  ...
  ...
}

şeklinde OutputCache niteliğini kullanmaya başladım.
Başka yöntemlerde bulunuyor tabiki ( meta tag veya javascript history.navigationMode gibi işlemler).


Kaynaklar:

asp.net mvc disable browser cache
http://stackoverflow.com/questions/1160105/asp-net-mvc-disable-browser-cache

ASP.NET MVC ACTION FILTER - CACHING AND COMPRESSION
http://weblogs.asp.net/rashid/archive/2008/03/28/asp-net-mvc-action-filter-caching-and-compression.aspx

ASP.NET MVC3 Caching
http://www.codeguru.com/csharp/article.php/c18745/ASPNET-MVC3-Caching.htm

Hacking the browser cache with JQuery and ASP.NET MVC
http://weblogs.asp.net/cibrax/archive/2012/02/10/hacking-the-browser-cache-with-jquery-and-asp-net-mvc.aspx

history.navigationMode = 'compatible'; //fire jQuery ready
http://www.binrand.com/post/2349307-indexof-sectionid-history-navigationmode-compatible-fire-jquery-ready.html

Cross-browser onload event and the Back button
http://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button

Force Firefox to Reload Page on Back Button
http://stackoverflow.com/questions/3536822/force-firefox-to-reload-page-on-back-button

Double Submit Prevention, Disabled buttons, Firefox and the Back Button
http://duckranger.com/2012/01/double-submit-prevention-disabled-buttons-firefox-and-the-back-button/



Hiç yorum yok: