Skip to content

Instantly share code, notes, and snippets.

View savitskiyan's full-sized avatar

Алексей savitskiyan

  • Ростов-на-Дону
View GitHub Profile
@savitskiyan
savitskiyan / FileActionResult.cs
Last active November 11, 2015 07:03
ASP.NET MVC 6 WebAPI support partial download file
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
namespace Server.Controllers
{
@savitskiyan
savitskiyan / FileActionResult.cs
Last active November 11, 2015 07:00
ASP.NET MVC 5 WebAPI support partial download file
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
@savitskiyan
savitskiyan / app.js
Last active December 7, 2015 11:14
Disable IE caching in angularjs application
angular.module(ApplicationConfiguration.applicationModuleName)
.config(['$httpProvider', function($httpProvider) {
//initialize get if not there
if (!$httpProvider.defaults.headers.get) {
$httpProvider.defaults.headers.get = {};
}
//disable IE ajax request caching
$httpProvider.defaults.headers.get['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT';