Edge computing permits the computation process at the edge of the network for enhancing the efficiency of the data access. The problem of optimal data block placement entirely depends on the maximization of interdependent factors, which corresponds to an NP-hard problem. In this paper, the Hybrid Harris Hawk-Salp Swarm-based Optimization, Data Placement and Task Scheduling (HHHSS-ODPTS) scheme is proposed for improving the user experience in edge computing. This data placement is devised considering the popularity and user preference of data blocks, storage capacity of edge server, and the ratio of replacement associated with the edge servers. This proposed scheme utilized a 2/3-approximation method for essential mapping of tasks with generated containers of the edge server. The simulation results confirmed that the proposed HHHSS-ODPTS scheme is better at data response time, response time of tasks, number of the replaced data blocks, and hit rate of tasks with different capacity of data storage, number of required data blocks, and data popularity.