Web-based attacks remain a critical threat to edge-enabled systems, particularly with the rapid growth of IoT and mobile computing. Limited bandwidth and real-time operations challenge centralized security tools, necessitating lightweight distributed detection solutions. This study presents a novel framework, Distributed Improved Group Finite Residual Element Pied Kingfisher Integrated Attention Network (Imp-GrFi-REPK-IAN), for web attack detection on edge devices. Data collection involves real-time URL gathering, decoding, and normalization, followed by balanced distribution into three datasets (CSIC 2010, FWAF, and HttpParams), each containing benign and malicious traffic. Preprocessing employs a time series min-max visualization-aware method to capture temporal signal patterns. Features are represented using an Elastic Decision Transformer, while classification is performed by Imp-GrFi-REPK-IAN, integrating a Finite Element-Integrated Neural Network (FEINN) with a Residual Group Attention Network (ResGANet). Parameter optimization is handled by the Improved Pied Kingfisher Optimizer (IPKO), ensuring faster convergence and enhanced precision. Experimental results show that the proposed system achieves 99.9% accuracy, surpassing existing edge- based detection approaches.